When VRRP is enabled, router interface deletion fails when used with subnet id

Fix is used to explicitly delete the router interfaces when using the subnet id option

Change-Id: I7a2e38e968e333c3e012b63e92295721b8e97070
changes/28/318528/1 mitaka-eol
Ritesh Madapurath 7 years ago
parent fe29e27b5e
commit 0702534af6

@ -292,12 +292,18 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
"router_id=%(router_id)s "
"interface_info=%(interface_info)r",
{'router_id': router_id, 'interface_info': interface_info})
remove_by_port, remove_by_subnet = (
self._validate_interface_info(interface_info, for_removal=True)
)
with context.session.begin(subtransactions=True):
info = super(BrocadeSVIPlugin, self).remove_router_interface(
context, router_id, interface_info)
try:
subnet = self._core_plugin._get_subnet(context, info['subnet_id'])
if self._svi['redundancy'] and remove_by_subnet:
self._core_plugin.delete_port(context, info['port_id'],
l3_port_check=False)
cidr = subnet['cidr']
net_addr, net_len = self.net_addr(cidr)
gateway_ip = subnet['gateway_ip']

Loading…
Cancel
Save