Merge "Fix error raised when router-interface-delete on no-snat routers"
This commit is contained in:
commit
94ec105ce7
@ -1675,6 +1675,9 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
if not subnet:
|
if not subnet:
|
||||||
subnet = self._get_subnet(context, subnet_id)
|
subnet = self._get_subnet(context, subnet_id)
|
||||||
router = self._get_router(context, router_id)
|
router = self._get_router(context, router_id)
|
||||||
|
# If router is enabled_snat = False there are no snat rules to
|
||||||
|
# delete.
|
||||||
|
if router.enable_snat:
|
||||||
self._delete_subnet_snat_rule(router, subnet)
|
self._delete_subnet_snat_rule(router, subnet)
|
||||||
# Relax the minimum expected number as the nosnat rules
|
# Relax the minimum expected number as the nosnat rules
|
||||||
# do not exist in 2.x deployments
|
# do not exist in 2.x deployments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user