diff --git a/nova/tests/unit/virt/xenapi/test_vif.py b/nova/tests/unit/virt/xenapi/test_vif.py index e5f419ca96..917a44cf21 100644 --- a/nova/tests/unit/virt/xenapi/test_vif.py +++ b/nova/tests/unit/virt/xenapi/test_vif.py @@ -47,7 +47,7 @@ def fake_call_xenapi(method, *args): return {'uuid': fake_vif['uuid'], 'MAC': fake_vif['address'], 'network': 'fake_network', - 'other_config': {'nicira-iface-id': fake_vif['id']} + 'other_config': {'neutron-port-id': fake_vif['id']} } else: raise exception.Exception("Failed get vif record") @@ -293,7 +293,6 @@ class XenAPIOpenVswitchDriverTestCase(XenVIFDriverTestBase): 'MAC': fake_vif['address'], 'network': 'fake_network', 'other_config': { - 'nicira-iface-id': 'fake-nicira-iface-id', 'neutron-port-id': 'fake-neutron-port-id'} } mock_VIF_get_record = self.mock_patch_object( @@ -327,7 +326,6 @@ class XenAPIOpenVswitchDriverTestCase(XenVIFDriverTestBase): 'MAC': fake_vif['address'], 'network': 'fake_network', 'other_config': { - 'nicira-iface-id': 'fake-nicira-iface-id', 'neutron-port-id': 'fake-neutron-port-id'} } mock_VIF_get_record = self.mock_patch_object( diff --git a/nova/tests/unit/virt/xenapi/test_vmops.py b/nova/tests/unit/virt/xenapi/test_vmops.py index 98e38468aa..2540f3165a 100644 --- a/nova/tests/unit/virt/xenapi/test_vmops.py +++ b/nova/tests/unit/virt/xenapi/test_vmops.py @@ -1793,8 +1793,8 @@ class LiveMigrateHelperTestCase(VMOpsTestBase): 'get_other_config') as mock_other_config, \ mock.patch.object(self._session.VM, 'get_VIFs') as mock_get_vif: - mock_other_config.side_effect = [{'nicira-iface-id': 'vif_id_a'}, - {'nicira-iface-id': 'vif_id_b'}] + mock_other_config.side_effect = [{'neutron-port-id': 'vif_id_a'}, + {'neutron-port-id': 'vif_id_b'}] mock_get_vif.return_value = ['vif_ref1'] vif_uuid_map = {'': 'default_net_ref'} vif_map = self.vmops._generate_vif_network_map('vm_ref', diff --git a/nova/virt/xenapi/vif.py b/nova/virt/xenapi/vif.py index ef2e19dcb0..b8c6c0cec7 100644 --- a/nova/virt/xenapi/vif.py +++ b/nova/virt/xenapi/vif.py @@ -274,9 +274,7 @@ class XenAPIOpenVswitchDriver(XenVIFDriver): vif_rec['MTU'] = '1500' vif_rec['qos_algorithm_type'] = '' vif_rec['qos_algorithm_params'] = {} - # Deprecated: 'niciria-iface-id', will remove it in the next release - vif_rec['other_config'] = {'nicira-iface-id': vif['id'], - 'neutron-port-id': vif['id']} + vif_rec['other_config'] = {'neutron-port-id': vif['id']} vif_ref = self._create_vif(vif, vif_rec, vm_ref) # call XenAPI to plug vif diff --git a/releasenotes/notes/remove-deprecated-nicira-iface-id-in-xenserver-870bfab82f22cac1.yaml b/releasenotes/notes/remove-deprecated-nicira-iface-id-in-xenserver-870bfab82f22cac1.yaml new file mode 100644 index 0000000000..6cc2ae8a96 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-nicira-iface-id-in-xenserver-870bfab82f22cac1.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Setting of 'nicira-iface-id' in XenServer VIF's other-config + field by XenAPI driver has been removed to avoid VM booting + timeout problem when using neutron polling mode. + It was previously deprecated in Pike.