Add a remctl to find out the availability status of all hosts. 0.3.7
authorEvan Broder <broder@mit.edu>
Thu, 26 Feb 2009 06:18:05 +0000 (01:18 -0500)
committerEvan Broder <broder@mit.edu>
Thu, 26 Feb 2009 06:18:05 +0000 (01:18 -0500)
svn path=/trunk/packages/invirt-remote/; revision=2188

debian/changelog
server/usr/sbin/invirt-remote-availability [new file with mode: 0755]
server/usr/sbin/invirt-remote-proxy

index 6efda3f..321e411 100644 (file)
@@ -1,3 +1,10 @@
+invirt-remote (0.3.7) unstable; urgency=low
+
+  * Add an availability remctl for when we get around to letting us make
+    web remctls.
+
+ -- Evan Broder <broder@mit.edu>  Thu, 26 Feb 2009 01:04:07 -0500
+
 invirt-remote (0.3.6) unstable; urgency=low
 
   * Don't confuse KB with KiB, or MB with MiB.
 invirt-remote (0.3.6) unstable; urgency=low
 
   * Don't confuse KB with KiB, or MB with MiB.
diff --git a/server/usr/sbin/invirt-remote-availability b/server/usr/sbin/invirt-remote-availability
new file mode 100755 (executable)
index 0000000..8c128d2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+"""
+Retrieve and print out the availability value for all Invirt hosts
+"""
+
+from invirt import remote
+import yaml
+import sys
+
+def main(argv):
+    print yaml.dump(dict(remote.bcast('availability')), default_flow_style=False)
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
index f05fa65..358447c 100755 (executable)
@@ -16,6 +16,8 @@ case "$TYPE/$SERVICE" in
        invirt-remote-listvms "$@" ;;
     web/vnccert )
         invirt-remote-vnccert "$@" ;;
        invirt-remote-listvms "$@" ;;
     web/vnccert )
         invirt-remote-vnccert "$@" ;;
+    web/availability )
+        invirt-remote-availability "$@" ;;
     control/help )
         invirt-remctl-help ;;
     control/create|control/install )
     control/help )
         invirt-remctl-help ;;
     control/create|control/install )