Merge "[NSX-p] Check for a LB before enabling/disabling service router"
This commit is contained in:
commit
bf3f0b67e4
@ -1558,8 +1558,9 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||||||
router_subnets = self._find_router_subnets(
|
router_subnets = self._find_router_subnets(
|
||||||
context.elevated(), router_id)
|
context.elevated(), router_id)
|
||||||
sr_currently_exists = self.verify_sr_at_backend(router_id)
|
sr_currently_exists = self.verify_sr_at_backend(router_id)
|
||||||
lb_exist = False
|
lb_exist = self.service_router_has_loadbalancers(context, router_id)
|
||||||
fw_exist = self._router_has_edge_fw_rules(context, router)
|
fw_exist = self._router_has_edge_fw_rules(context, router)
|
||||||
|
# TODO(asarfaty): Add vpnaas check here
|
||||||
actions = self._get_update_router_gw_actions(
|
actions = self._get_update_router_gw_actions(
|
||||||
org_tier0_uuid, orgaddr, org_enable_snat,
|
org_tier0_uuid, orgaddr, org_enable_snat,
|
||||||
new_tier0_uuid, newaddr, new_enable_snat,
|
new_tier0_uuid, newaddr, new_enable_snat,
|
||||||
|
@ -1435,6 +1435,9 @@ class NsxPTestL3NatTestCase(NsxPTestL3NatTest,
|
|||||||
def setUp(self, *args, **kwargs):
|
def setUp(self, *args, **kwargs):
|
||||||
super(NsxPTestL3NatTestCase, self).setUp(*args, **kwargs)
|
super(NsxPTestL3NatTestCase, self).setUp(*args, **kwargs)
|
||||||
|
|
||||||
|
mock.patch.object(self.plugin.nsxpolicy, 'search_by_tags',
|
||||||
|
return_value={'results': []}).start()
|
||||||
|
|
||||||
def test__notify_gateway_port_ip_changed(self):
|
def test__notify_gateway_port_ip_changed(self):
|
||||||
self.skipTest('not supported')
|
self.skipTest('not supported')
|
||||||
|
|
||||||
|
@ -540,6 +540,9 @@ class TestVpnaasDriver(test_plugin.NsxPPluginTestCaseMixin):
|
|||||||
self.policy_vpn = self.plugin.nsxpolicy.ipsec_vpn
|
self.policy_vpn = self.plugin.nsxpolicy.ipsec_vpn
|
||||||
self.l3plugin = self.plugin
|
self.l3plugin = self.plugin
|
||||||
|
|
||||||
|
mock.patch.object(self.plugin.nsxpolicy, 'search_by_tags',
|
||||||
|
return_value={'results': []}).start()
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def router(self, name='vpn-test-router', tenant_id=_uuid(),
|
def router(self, name='vpn-test-router', tenant_id=_uuid(),
|
||||||
admin_state_up=True, **kwargs):
|
admin_state_up=True, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user