summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-07-05 14:36:52 +0000
committerEd Leafe <ed@leafe.com>2011-07-05 14:36:52 +0000
commitb02b1d78245634f81a27d0ba0a6e29024495c162 (patch)
tree2831b6c8589c8bd82b85e5bae431ef215d5ea20f /plugins
parent7307f17edeb284a6b2da076ffa16b2ef5c82a4f4 (diff)
downloadnova-b02b1d78245634f81a27d0ba0a6e29024495c162.tar.gz
nova-b02b1d78245634f81a27d0ba0a6e29024495c162.tar.xz
nova-b02b1d78245634f81a27d0ba0a6e29024495c162.zip
Updated the plugin to return the actual enabled status instead of just 'true' or 'false'
.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
index 13e62929a..292bbce12 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
@@ -95,7 +95,11 @@ def set_host_enabled(self, arg_dict):
cmd = "xe host-param-list uuid=%s | grep enabled" % host_uuid
resp = _run_command(cmd)
# Response should be in the format: "enabled ( RO): true"
- status = resp.strip().split()[-1]
+ host_enabled = resp.strip().split()[-1]
+ if host_enabled == "true":
+ status = "enabled"
+ else:
+ status = "disabled"
return {"status": status}