ia64/xen-unstable

changeset 13008:10f51535cc84

Allow adding VIF devices to a VM when in halted state. Do not attempt to create the VIF device if VM is in halted state.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author jfehlig@jfehlig2.provo.novell.com
date Tue Dec 12 15:28:23 2006 -0700 (2006-12-12)
parents 87f220709073
children aed5a0d88879
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Dec 13 11:23:01 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Dec 12 15:28:23 2006 -0700
     1.3 @@ -2045,7 +2045,7 @@ class XendDomainInfo:
     1.4          if not dev_uuid:
     1.5              raise XendError('Failed to create device')
     1.6          
     1.7 -        if self.state in (DOM_STATE_HALTED,):
     1.8 +        if self.state in (XEN_API_VM_POWER_STATE_RUNNING,):
     1.9              sxpr = self.info.device_sxpr(dev_uuid)
    1.10              devid = self.getDeviceController('vif').createDevice(sxpr)
    1.11              raise XendError("Device creation failed")