Loading cloudcontrol/node/hypervisor/domains/vm_tags.py +15 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,10 @@ from xml.etree import cElementTree as et from StringIO import StringIO import libvirt from cloudcontrol.common.client.tags import ttl, refresh from cloudcontrol.node.utils import execute from cloudcontrol.common.client.tags import ttl, refresh, background logger = logging.getLogger(__name__) Loading Loading @@ -55,6 +58,17 @@ def uuid(dom): return dom.uuid.lower() @background def rescue(dom): """Is rescue mode enabled or not""" rescue_path = dom.hypervisor.handler.main.config.rescue_script rcode, output = execute(dom.hypervisor.handler.main, [rescue_path, '-s', dom.name]) if rcode == 0: return output.strip() else: return 'error' def status(dom): return dom.state Loading Loading
cloudcontrol/node/hypervisor/domains/vm_tags.py +15 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,10 @@ from xml.etree import cElementTree as et from StringIO import StringIO import libvirt from cloudcontrol.common.client.tags import ttl, refresh from cloudcontrol.node.utils import execute from cloudcontrol.common.client.tags import ttl, refresh, background logger = logging.getLogger(__name__) Loading Loading @@ -55,6 +58,17 @@ def uuid(dom): return dom.uuid.lower() @background def rescue(dom): """Is rescue mode enabled or not""" rescue_path = dom.hypervisor.handler.main.config.rescue_script rcode, output = execute(dom.hypervisor.handler.main, [rescue_path, '-s', dom.name]) if rcode == 0: return output.strip() else: return 'error' def status(dom): return dom.state Loading