Merge "XenAPI: Don't use nicira-iface-id for XenServer VIF"

This commit is contained in:
Zuul 2017-12-14 21:47:52 +00:00 committed by Gerrit Code Review
commit 70deaeb93e
4 changed files with 11 additions and 8 deletions

View File

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

View File

@ -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',

View File

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

View File

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