From d1207209d27ff791910c31f6c194bc78e77319c1 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Thu, 26 Feb 2009 01:18:05 -0500 Subject: [PATCH] Add a remctl to find out the availability status of all hosts. svn path=/trunk/packages/invirt-remote/; revision=2188 --- debian/changelog | 7 +++++++ server/usr/sbin/invirt-remote-availability | 15 +++++++++++++++ server/usr/sbin/invirt-remote-proxy | 2 ++ 3 files changed, 24 insertions(+) create mode 100755 server/usr/sbin/invirt-remote-availability diff --git a/debian/changelog b/debian/changelog index 6efda3f..321e411 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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. diff --git a/server/usr/sbin/invirt-remote-availability b/server/usr/sbin/invirt-remote-availability new file mode 100755 index 0000000..8c128d2 --- /dev/null +++ b/server/usr/sbin/invirt-remote-availability @@ -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)) diff --git a/server/usr/sbin/invirt-remote-proxy b/server/usr/sbin/invirt-remote-proxy index f05fa65..358447c 100755 --- a/server/usr/sbin/invirt-remote-proxy +++ b/server/usr/sbin/invirt-remote-proxy @@ -16,6 +16,8 @@ case "$TYPE/$SERVICE" in invirt-remote-listvms "$@" ;; web/vnccert ) invirt-remote-vnccert "$@" ;; + web/availability ) + invirt-remote-availability "$@" ;; control/help ) invirt-remctl-help ;; control/create|control/install ) -- 1.7.9.5