summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiago Mello <tmello@linux.vnet.ibm.com>2012-08-28 14:51:45 -0400
committerTiago Mello <tmello@linux.vnet.ibm.com>2012-08-29 22:25:46 -0400
commitb3d2322f0deba47b42318b9b04b26ac22ae0a5ff (patch)
treee5ee301142c114df6c876755e7a2df03cf2aa910
parentd0693f6c5c2db76041131a6342a413078f7171f2 (diff)
Fixes spawn method signature for PowerVM driver.
ComputeDriver has now 2 new required arguments which are: injected_files and admin_password. This patch adds the arguments in the PowerVMDriver spawn signature. Fixes bug 1040770 Change-Id: I0a45fa45c942f2d0381c5a7310d386ae655073fe
-rw-r--r--nova/tests/test_powervm.py2
-rw-r--r--nova/virt/powervm/driver.py19
2 files changed, 4 insertions, 17 deletions
diff --git a/nova/tests/test_powervm.py b/nova/tests/test_powervm.py
index 13d9cdd58..f40ef534c 100644
--- a/nova/tests/test_powervm.py
+++ b/nova/tests/test_powervm.py
@@ -146,7 +146,7 @@ class PowerVMDriverTestCase(test.TestCase):
image_meta = {}
image_meta['id'] = '666'
self.powervm_connection.spawn(context.get_admin_context(),
- self.instance, image_meta)
+ self.instance, image_meta, 's3cr3t', [])
state = self.powervm_connection.get_info(self.instance)['state']
self.assertEqual(state, power_state.RUNNING)
diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py
index 0ee52105a..06c17447c 100644
--- a/nova/virt/powervm/driver.py
+++ b/nova/virt/powervm/driver.py
@@ -105,22 +105,9 @@ class PowerVMDriver(driver.ComputeDriver):
def plug_vifs(self, instance, network_info):
pass
- def spawn(self, context, instance, image_meta,
- network_info=None, block_device_info=None):
- """
- Create a new instance/VM/domain on powerVM.
-
- :param context: security context
- :param instance: Instance object as returned by DB layer.
- This function should use the data there to guide
- the creation of the new instance.
- :param image_meta: image object returned by nova.image.glance that
- defines the image from which to boot this instance
- :param network_info:
- :py:meth:`~nova.network.manager.NetworkManager.get_instance_nw_info`
- :param block_device_info: Information about block devices to be
- attached to the instance.
- """
+ def spawn(self, context, instance, image_meta, injected_files,
+ admin_password, network_info=None, block_device_info=None):
+ """Create a new instance/VM/domain on powerVM."""
self._powervm.spawn(context, instance, image_meta['id'])
def destroy(self, instance, network_info, block_device_info=None):