Merge "NSX|V3+P: Fix MDProxy TZ validation"
This commit is contained in:
commit
27a93cb2e6
@ -1000,7 +1000,6 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||||||
physical_net = network_data.get(pnet.PHYSICAL_NETWORK)
|
physical_net = network_data.get(pnet.PHYSICAL_NETWORK)
|
||||||
if not validators.is_attr_set(physical_net):
|
if not validators.is_attr_set(physical_net):
|
||||||
physical_net = None
|
physical_net = None
|
||||||
|
|
||||||
vlan_id = network_data.get(pnet.SEGMENTATION_ID)
|
vlan_id = network_data.get(pnet.SEGMENTATION_ID)
|
||||||
if not validators.is_attr_set(vlan_id):
|
if not validators.is_attr_set(vlan_id):
|
||||||
vlan_id = None
|
vlan_id = None
|
||||||
|
@ -148,7 +148,9 @@ class NsxPPluginTestCaseMixin(
|
|||||||
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibTransportNode."
|
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibTransportNode."
|
||||||
"get_transport_zones",
|
"get_transport_zones",
|
||||||
return_value=[NSX_OVERLAY_TZ_NAME,
|
return_value=[NSX_OVERLAY_TZ_NAME,
|
||||||
NSX_VLAN_TZ_NAME]).start()
|
NSX_VLAN_TZ_NAME, mock.ANY]).start()
|
||||||
|
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibEdgeCluster."
|
||||||
|
"get_transport_nodes", return_value=["dummy"]).start()
|
||||||
|
|
||||||
def _mock_nsxlib_backend_calls(self):
|
def _mock_nsxlib_backend_calls(self):
|
||||||
"""Mock nsxlib backend calls used as passthrough
|
"""Mock nsxlib backend calls used as passthrough
|
||||||
|
@ -182,6 +182,13 @@ def _mock_nsx_backend_calls():
|
|||||||
mock.patch('vmware_nsxlib.v3.core_resources.NsxLibTransportZone.'
|
mock.patch('vmware_nsxlib.v3.core_resources.NsxLibTransportZone.'
|
||||||
'get_transport_type', return_value='OVERLAY').start()
|
'get_transport_type', return_value='OVERLAY').start()
|
||||||
|
|
||||||
|
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibEdgeCluster."
|
||||||
|
"get_transport_nodes", return_value=['dummy']).start()
|
||||||
|
|
||||||
|
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibTransportNode."
|
||||||
|
"get_transport_zones",
|
||||||
|
return_value=[NSX_TZ_NAME, mock.ANY]).start()
|
||||||
|
|
||||||
|
|
||||||
class NsxV3PluginTestCaseMixin(test_plugin.NeutronDbPluginV2TestCase,
|
class NsxV3PluginTestCaseMixin(test_plugin.NeutronDbPluginV2TestCase,
|
||||||
nsxlib_testcase.NsxClientTestCase):
|
nsxlib_testcase.NsxClientTestCase):
|
||||||
@ -2797,7 +2804,7 @@ class TestL3NatTestCase(L3NatTest,
|
|||||||
router_id, ext_subnet['network_id'])
|
router_id, ext_subnet['network_id'])
|
||||||
# Checking that router update is being called with
|
# Checking that router update is being called with
|
||||||
# edge_cluster_uuid, for creating a service router
|
# edge_cluster_uuid, for creating a service router
|
||||||
change_sr.assert_called_once_with(
|
change_sr.assert_any_call(
|
||||||
mock.ANY, edge_cluster_id=NSX_EDGE_CLUSTER_UUID,
|
mock.ANY, edge_cluster_id=NSX_EDGE_CLUSTER_UUID,
|
||||||
enable_standby_relocation=True)
|
enable_standby_relocation=True)
|
||||||
|
|
||||||
@ -3161,7 +3168,7 @@ class TestL3NatTestCase(L3NatTest,
|
|||||||
router_id = r['router']['id']
|
router_id = r['router']['id']
|
||||||
self._add_external_gateway_to_router(
|
self._add_external_gateway_to_router(
|
||||||
router_id, ext_subnet['network_id'])
|
router_id, ext_subnet['network_id'])
|
||||||
change_sr.assert_called_once_with(
|
change_sr.assert_any_call(
|
||||||
mock.ANY, edge_cluster_id=edge_cluster,
|
mock.ANY, edge_cluster_id=edge_cluster,
|
||||||
enable_standby_relocation=True)
|
enable_standby_relocation=True)
|
||||||
self.mock_get_edge_cluster.start()
|
self.mock_get_edge_cluster.start()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user