summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-08-18 09:57:16 +0000
committerTarmac <>2011-08-18 09:57:16 +0000
commitc7ecb22e46bf316fa2506dd3664c77274b6ee94d (patch)
tree74fac1d486456f40b3e2ee9d15512e1ae7d62b22 /plugins
parentaca07a42fabb7f506cf132b995b4ad0139987b02 (diff)
parentecc4e9ee389115e3793f94aaf53f8fbe59e7ac66 (diff)
downloadnova-c7ecb22e46bf316fa2506dd3664c77274b6ee94d.tar.gz
nova-c7ecb22e46bf316fa2506dd3664c77274b6ee94d.tar.xz
nova-c7ecb22e46bf316fa2506dd3664c77274b6ee94d.zip
Adds the enabled status of a host when XenServer reports its host's capabilities. This allows the scheduler to ignore hosts whose enabled is False when considering where to place a new instance.
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
index cd9694ce1..36c61f78d 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
@@ -258,6 +258,7 @@ def cleanup(dct):
# out["host_suspend-image-sr-uuid"] = dct.get("suspend-image-sr-uuid", "")
# out["host_crash-dump-sr-uuid"] = dct.get("crash-dump-sr-uuid", "")
# out["host_local-cache-sr"] = dct.get("local-cache-sr", "")
+ out["enabled"] = dct.get("enabled", "true") == "true"
out["host_memory"] = omm = {}
omm["total"] = safe_int(dct.get("memory-total", ""))
omm["overhead"] = safe_int(dct.get("memory-overhead", ""))