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
This commit is contained in:
Tiago Mello 2012-08-28 14:51:45 -04:00
parent d0693f6c5c
commit b3d2322f0d
2 changed files with 4 additions and 17 deletions

View File

@ -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)

View File

@ -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):