Use tenant context to get router GW network
If the tenant tries to use a network he is not allowed to, the router action should fail with the NotFound reason. Change-Id: I6eb32636f8e188f2abc7df22cc1732966f968538
This commit is contained in:
parent
3e63e06182
commit
dc3b5bb0b4
@ -320,7 +320,7 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
network_id = (gw_info.get('network_id') if gw_info
|
network_id = (gw_info.get('network_id') if gw_info
|
||||||
else None)
|
else None)
|
||||||
if network_id:
|
if network_id:
|
||||||
ext_net = self._get_network(context.elevated(), network_id)
|
ext_net = self._get_network(context, network_id)
|
||||||
if not ext_net.external:
|
if not ext_net.external:
|
||||||
msg = (_("Network '%s' is not a valid external network") %
|
msg = (_("Network '%s' is not a valid external network") %
|
||||||
network_id)
|
network_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user