summaryrefslogtreecommitdiffstats
path: root/plugins/xenserver
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-05 22:20:58 +0000
committerGerrit Code Review <review@openstack.org>2012-07-05 22:20:58 +0000
commitefa69b44ccdacc788a39b893d46168a725c95ec2 (patch)
treea87defd95abff8ee5c746abd38acb7b81f96b0e8 /plugins/xenserver
parent6335e66e1c1a825c28cb7beb46ef913401693bae (diff)
parent6222385d837f90f769c94f21d003999741c4f800 (diff)
downloadnova-efa69b44ccdacc788a39b893d46168a725c95ec2.tar.gz
nova-efa69b44ccdacc788a39b893d46168a725c95ec2.tar.xz
nova-efa69b44ccdacc788a39b893d46168a725c95ec2.zip
Merge "Get hypervisor uptime."
Diffstat (limited to 'plugins/xenserver')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
index d7effba19..4006de420 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
@@ -339,6 +339,12 @@ def parse_response(resp):
return data
+@jsonify
+def host_uptime(self, arg_dict):
+ """Returns the result of the uptime command on the xenhost."""
+ return {"uptime": _run_command('uptime')}
+
+
def cleanup(dct):
"""Take the raw KV pairs returned and translate them into the
appropriate types, discarding any we don't need.
@@ -432,4 +438,5 @@ if __name__ == "__main__":
"host_join": host_join,
"get_config": get_config,
"set_config": set_config,
- "iptables_config": iptables_config})
+ "iptables_config": iptables_config,
+ "host_uptime": host_uptime})