Fix the breaking change to ComputeDriver.spawn in nova-dpm
Following updates are made to the signature of spawn method and its
corresponding references in test_driver.py.
- add "allocations" kw arg as per [1]
- remove "flavor" kw arg as per [2]
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-October/123738.htm
[2] 8749bda96e
Closes-Bug: 1724744
Change-Id: I6fd6974a0b32bbcc520a2fdd2c948367f3e8ae5f
Signed-off-by: Sreeram Vancheeswaran <sreeram.vancheeswaran@in.ibm.com>
This commit is contained in:
parent
a2ab076fd2
commit
1ba30f87af
|
@ -314,7 +314,7 @@ class DPMDriverInstanceTestCase(TestCase):
|
|||
network_info = [x for x in range(0, 13)]
|
||||
self.assertRaises(exceptions.MaxAmountOfInstancePortsExceededError,
|
||||
dpmdriver.spawn, None, None, None, None, None,
|
||||
network_info, flavor=mock.Mock())
|
||||
None, network_info)
|
||||
|
||||
@mock.patch.object(driver.DPMDriver, 'get_fc_boot_props',
|
||||
return_value=(None, None))
|
||||
|
@ -342,9 +342,8 @@ class DPMDriverInstanceTestCase(TestCase):
|
|||
"type": "dpm_vswitch",
|
||||
"details": {"object_id": "2"}}
|
||||
network_info = [vif, vif2]
|
||||
self.dpmdriver.spawn(None, mock_instance, None, None, None,
|
||||
network_info, flavor=mock.Mock())
|
||||
|
||||
self.dpmdriver.spawn(None, mock_instance, None, None, None, None,
|
||||
network_info)
|
||||
partition = cpc.partitions.find(**{
|
||||
"object-id": "1"})
|
||||
nics = partition.nics.list()
|
||||
|
|
|
@ -322,8 +322,8 @@ class DPMDriver(driver.ComputeDriver):
|
|||
inst.attach_hbas()
|
||||
|
||||
def spawn(self, context, instance, image_meta, injected_files,
|
||||
admin_password, network_info=None, block_device_info=None,
|
||||
flavor=None):
|
||||
admin_password, allocations, network_info=None,
|
||||
block_device_info=None):
|
||||
|
||||
inst = vm.PartitionInstance(instance, self._cpc)
|
||||
|
||||
|
|
Loading…
Reference in New Issue