@@ -19243,8 +19243,7 @@ def _test_attach_detach_interface_get_config(self, method_name):
19243
19243
expected = drvr.vif_driver.get_config(instance, network_info[0],
19244
19244
fake_image_meta,
19245
19245
instance.get_flavor(),
19246
- CONF.libvirt.virt_type,
19247
- drvr._host)
19246
+ CONF.libvirt.virt_type)
19248
19247
mock_get_config = self.useFixture(fixtures.MockPatchObject(
19249
19248
drvr.vif_driver, 'get_config')).mock
19250
19249
mock_get_config.return_value = expected
@@ -19261,7 +19260,7 @@ def _test_attach_detach_interface_get_config(self, method_name):
19261
19260
19262
19261
mock_get_config.assert_called_once_with(
19263
19262
instance, network_info[0], test.MatchType(objects.ImageMeta),
19264
- test.MatchType(objects.Flavor), CONF.libvirt.virt_type, drvr._host )
19263
+ test.MatchType(objects.Flavor), CONF.libvirt.virt_type)
19265
19264
19266
19265
@mock.patch.object(lockutils, "external_lock")
19267
19266
def test_attach_interface_get_config(self, mock_lock):
@@ -23334,7 +23333,7 @@ def test_attach_interface_build_metadata_fails(self):
23334
23333
{'id': instance.image_ref})
23335
23334
expected = self.drvr.vif_driver.get_config(
23336
23335
instance, network_info[0], fake_image_meta, instance.flavor,
23337
- CONF.libvirt.virt_type, self.drvr._host )
23336
+ CONF.libvirt.virt_type)
23338
23337
with test.nested(
23339
23338
mock.patch.object(host.Host, '_get_domain', return_value=domain),
23340
23339
mock.patch.object(domain, 'attachDeviceFlags'),
@@ -23357,7 +23356,7 @@ def test_attach_interface_build_metadata_fails(self):
23357
23356
mock_info.assert_called_with()
23358
23357
mock_get_config.assert_called_with(
23359
23358
instance, network_info[0], fake_image_meta, instance.flavor,
23360
- CONF.libvirt.virt_type, self.drvr._host )
23359
+ CONF.libvirt.virt_type)
23361
23360
mock_build_device_metadata.assert_called_with(self.context,
23362
23361
instance)
23363
23362
mock_attach_device_flags.assert_called_with(
@@ -23397,7 +23396,7 @@ def _test_attach_interface(self, power_state, expected_flags,
23397
23396
{'id': instance.image_ref})
23398
23397
expected = self.drvr.vif_driver.get_config(
23399
23398
instance, network_info[0], fake_image_meta, instance.flavor,
23400
- CONF.libvirt.virt_type, self.drvr._host )
23399
+ CONF.libvirt.virt_type)
23401
23400
mock_build.return_value = objects.InstanceDeviceMetadata()
23402
23401
23403
23402
with test.nested(
@@ -23409,8 +23408,7 @@ def _test_attach_interface(self, power_state, expected_flags,
23409
23408
23410
23409
mock_get_config.assert_called_once_with(
23411
23410
instance, network_info[0], test.MatchType(objects.ImageMeta),
23412
- test.MatchType(objects.Flavor), CONF.libvirt.virt_type,
23413
- self.drvr._host)
23411
+ test.MatchType(objects.Flavor), CONF.libvirt.virt_type)
23414
23412
mock_get_domain.assert_called_once_with(instance)
23415
23413
mock_info.assert_called_once_with()
23416
23414
mock_build.assert_called_once_with(self.context, instance)
@@ -23493,8 +23491,7 @@ def _test_detach_interface(self, power_state, expected_flags,
23493
23491
mock_get_guest.assert_called_once_with(instance)
23494
23492
mock_get_config.assert_called_once_with(
23495
23493
instance, network_info[0], test.MatchType(objects.ImageMeta),
23496
- test.MatchType(objects.Flavor), CONF.libvirt.virt_type,
23497
- self.drvr._host)
23494
+ test.MatchType(objects.Flavor), CONF.libvirt.virt_type)
23498
23495
mock_get_interface.assert_has_calls(
23499
23496
[mock.call(expected_cfg) for x in range(len(get_interface_calls))])
23500
23497
@@ -23632,8 +23629,7 @@ def test_detach_interface_device_with_same_mac_address(
23632
23629
self.assertEqual(4, mock_get_interface.call_count)
23633
23630
mock_get_config.assert_called_once_with(
23634
23631
instance, network_info[0], test.MatchType(objects.ImageMeta),
23635
- test.MatchType(objects.Flavor), CONF.libvirt.virt_type,
23636
- self.drvr._host)
23632
+ test.MatchType(objects.Flavor), CONF.libvirt.virt_type)
23637
23633
mock_get_domain.assert_called_once_with(instance)
23638
23634
mock_info.assert_called_once_with()
23639
23635
mock_detach.assert_called_once_with(expected.to_xml(),
0 commit comments