NSX|v Do not allow changing the type of a router with firewall
Currently the plugin does not support shared routers with FWaaS firewalls. So it should fail when the user tries to change the type of a router with a firewall to 'shared'. Depends-on: Ib31210121a56561fb33a8ed0a1fbbdf6b01db727 Change-Id: Ieeed46ffd7309a8a8d423e44f766fec5f47b6184
This commit is contained in:
parent
2e6ed98749
commit
007350b0bb
@ -3281,6 +3281,12 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
'balancer')
|
||||
raise n_exc.InvalidInput(error_message=err_msg)
|
||||
|
||||
# shared router cannot be attached to a fwaas
|
||||
if self.fwaas_callbacks.should_apply_firewall_to_router(
|
||||
context, router, router_id):
|
||||
err_msg = _('Unable to create a shared router with FWaaS')
|
||||
raise n_exc.InvalidInput(error_message=err_msg)
|
||||
|
||||
def update_router(self, context, router_id, router):
|
||||
with locking.LockManager.get_lock('router-%s' % router_id):
|
||||
return self._safe_update_router(context, router_id, router)
|
||||
|
Loading…
x
Reference in New Issue
Block a user