Remove "supports_recreate" from capabilities
The changeset to close bug 1821891 added the field "supports_evacuate" in the driver capabilities without removing "supports_recreate", which was the old field for the same. Change-Id: If93ed659dfcbe7dc2820e6110c5878adaf0de158 Closes-Bug: #1822853
This commit is contained in:
parent
2819a9cc62
commit
7a8516ffb5
|
@ -66,7 +66,6 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
def test_driver_capabilities_defaults(self):
|
def test_driver_capabilities_defaults(self):
|
||||||
"""Test the default capabilities."""
|
"""Test the default capabilities."""
|
||||||
test_driver = driver.PowerVMDriver(fake.FakeVirtAPI())
|
test_driver = driver.PowerVMDriver(fake.FakeVirtAPI())
|
||||||
self.assertTrue(test_driver.capabilities['supports_recreate'])
|
|
||||||
self.assertFalse(
|
self.assertFalse(
|
||||||
test_driver.capabilities['supports_migrate_to_same_host'])
|
test_driver.capabilities['supports_migrate_to_same_host'])
|
||||||
self.assertTrue(test_driver.capabilities['supports_attach_interface'])
|
self.assertTrue(test_driver.capabilities['supports_attach_interface'])
|
||||||
|
@ -79,7 +78,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
self.assertFalse(test_driver.capabilities['supports_multiattach'])
|
self.assertFalse(test_driver.capabilities['supports_multiattach'])
|
||||||
self.assertTrue(test_driver.capabilities['supports_evacuate'])
|
self.assertTrue(test_driver.capabilities['supports_evacuate'])
|
||||||
self.assertNotIn('has_imagecache', test_driver.capabilities)
|
self.assertNotIn('has_imagecache', test_driver.capabilities)
|
||||||
self.assertEqual(9, len(test_driver.capabilities))
|
self.assertEqual(8, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('pypowervm.tasks.storage.find_vg',
|
@mock.patch('pypowervm.tasks.storage.find_vg',
|
||||||
new=mock.Mock(return_value=(mock.Mock(), mock.Mock())))
|
new=mock.Mock(return_value=(mock.Mock(), mock.Mock())))
|
||||||
|
@ -93,7 +92,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
test_driver._setup_disk_adapter()
|
test_driver._setup_disk_adapter()
|
||||||
# Localdisk driver has the image cache capability
|
# Localdisk driver has the image cache capability
|
||||||
self.assertTrue(test_driver.capabilities['has_imagecache'])
|
self.assertTrue(test_driver.capabilities['has_imagecache'])
|
||||||
self.assertEqual(10, len(test_driver.capabilities))
|
self.assertEqual(9, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('nova_powervm.virt.powervm.disk.ssp.SSPDiskAdapter.'
|
@mock.patch('nova_powervm.virt.powervm.disk.ssp.SSPDiskAdapter.'
|
||||||
'_fetch_cluster', new=mock.Mock())
|
'_fetch_cluster', new=mock.Mock())
|
||||||
|
@ -110,7 +109,7 @@ class TestPowerVMDriverInit(test.NoDBTestCase):
|
||||||
test_driver._setup_disk_adapter()
|
test_driver._setup_disk_adapter()
|
||||||
# SSP driver doesn't have image cache capability
|
# SSP driver doesn't have image cache capability
|
||||||
self.assertFalse(test_driver.capabilities['has_imagecache'])
|
self.assertFalse(test_driver.capabilities['has_imagecache'])
|
||||||
self.assertEqual(10, len(test_driver.capabilities))
|
self.assertEqual(9, len(test_driver.capabilities))
|
||||||
|
|
||||||
@mock.patch('nova_powervm.virt.powervm.event.PowerVMNovaEventHandler',
|
@mock.patch('nova_powervm.virt.powervm.event.PowerVMNovaEventHandler',
|
||||||
autospec=True)
|
autospec=True)
|
||||||
|
|
|
@ -94,7 +94,6 @@ class PowerVMDriver(driver.ComputeDriver):
|
||||||
def __init__(self, virtapi):
|
def __init__(self, virtapi):
|
||||||
self.capabilities = {
|
self.capabilities = {
|
||||||
# NOTE(edmondsw): 'has_imagecache' will be set dynamically
|
# NOTE(edmondsw): 'has_imagecache' will be set dynamically
|
||||||
"supports_recreate": True,
|
|
||||||
"supports_migrate_to_same_host": False,
|
"supports_migrate_to_same_host": False,
|
||||||
"supports_attach_interface": True,
|
"supports_attach_interface": True,
|
||||||
"supports_device_tagging": False,
|
"supports_device_tagging": False,
|
||||||
|
|
Loading…
Reference in New Issue