diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-09-30 07:45:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-09-30 07:45:47 +0000 |
| commit | bcffec223be41576e40a3689718fbb87de759a08 (patch) | |
| tree | 319a3042b4b5e3ec5e8f04429581721e6efb0e34 /nova/tests | |
| parent | 7284dca72a5adb29b3e3e67ffec1c0821f12d7fb (diff) | |
| parent | 81fa6f717d6e32a4cfc2c734e228e60b204da045 (diff) | |
Merge "libvirt: allows attach and detach from all domains"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/fakelibvirt.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/tests/fakelibvirt.py b/nova/tests/fakelibvirt.py index e4328a00b..b933b004a 100644 --- a/nova/tests/fakelibvirt.py +++ b/nova/tests/fakelibvirt.py @@ -69,8 +69,11 @@ VIR_DOMAIN_SHUTOFF = 5 VIR_DOMAIN_CRASHED = 6 VIR_DOMAIN_XML_SECURE = 1 + VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = 1 +VIR_DOMAIN_AFFECT_CURRENT = 0 + VIR_CPU_COMPARE_ERROR = -1 VIR_CPU_COMPARE_INCOMPATIBLE = 0 VIR_CPU_COMPARE_IDENTICAL = 1 @@ -334,11 +337,17 @@ class Domain(object): self._def['devices']['disks'] += [disk_info] return True + def attachDeviceFlags(self, xml, _flags): + self.attachDevice(xml) + def detachDevice(self, xml): disk_info = _parse_disk_info(etree.fromstring(xml)) disk_info['_attached'] = True return disk_info in self._def['devices']['disks'] + def detachDeviceFlags(self, xml, _flags): + self.detachDevice(xml) + def XMLDesc(self, flags): disks = '' for disk in self._def['devices']['disks']: |
