summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Madapurath <rmadapur@brocade.com>2016-05-19 02:13:07 -0700
committerRitesh Madapurath <rmadapur@brocade.com>2016-05-19 02:18:13 -0700
commit0702534af669fd5ff0714383773d7242430a371d (patch)
tree82867d65885f2beab5f466c4f65e334e0a24bf99
parentfe29e27b5eb770f287db9a62ce5dd71981a6bffe (diff)
When VRRP is enabled, router interface deletion fails when used with subnet idHEADmitaka-eolmaster
Fix is used to explicitly delete the router interfaces when using the subnet id option Change-Id: I7a2e38e968e333c3e012b63e92295721b8e97070
Notes
Notes (review): Code-Review+2: Ritesh Madapurath <rmadapur@brocade.com> Workflow+1: Ritesh Madapurath <rmadapur@brocade.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 19 May 2016 09:38:10 +0000 Reviewed-on: https://review.openstack.org/318528 Project: openstack/networking-brocade Branch: refs/heads/master
-rw-r--r--networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py b/networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py
index a0cf168..7e5d62f 100644
--- a/networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py
+++ b/networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py
@@ -292,12 +292,18 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
292 "router_id=%(router_id)s " 292 "router_id=%(router_id)s "
293 "interface_info=%(interface_info)r", 293 "interface_info=%(interface_info)r",
294 {'router_id': router_id, 'interface_info': interface_info}) 294 {'router_id': router_id, 'interface_info': interface_info})
295 remove_by_port, remove_by_subnet = (
296 self._validate_interface_info(interface_info, for_removal=True)
297 )
295 with context.session.begin(subtransactions=True): 298 with context.session.begin(subtransactions=True):
296 info = super(BrocadeSVIPlugin, self).remove_router_interface( 299 info = super(BrocadeSVIPlugin, self).remove_router_interface(
297 context, router_id, interface_info) 300 context, router_id, interface_info)
298 301
299 try: 302 try:
300 subnet = self._core_plugin._get_subnet(context, info['subnet_id']) 303 subnet = self._core_plugin._get_subnet(context, info['subnet_id'])
304 if self._svi['redundancy'] and remove_by_subnet:
305 self._core_plugin.delete_port(context, info['port_id'],
306 l3_port_check=False)
301 cidr = subnet['cidr'] 307 cidr = subnet['cidr']
302 net_addr, net_len = self.net_addr(cidr) 308 net_addr, net_len = self.net_addr(cidr)
303 gateway_ip = subnet['gateway_ip'] 309 gateway_ip = subnet['gateway_ip']