]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
BigSwitch: sync state on disassociate floating ip
authorKevin Benton <kevin.benton@bigswitch.com>
Fri, 4 Oct 2013 07:19:12 +0000 (00:19 -0700)
committerMark McClain <mark.mcclain@dreamhost.com>
Tue, 8 Oct 2013 15:10:49 +0000 (11:10 -0400)
Sends the state of port's parent network to the backend controller
when a floating IP is disassociated from a port.

Closes-Bug: #1235074
Change-Id: I8375e6564b5d08f1adc7e7aef6affc97c8d03c5e
(cherry picked from commit 0bae949eed229613c77c4943edbf68c1c140f977)

neutron/plugins/bigswitch/plugin.py

index 285ca131b6989d8c27ae8be97812f3286e2f3c68..a7cf72ec2cbd33216e371ebb118a0eff402f2248 100644 (file)
@@ -1071,6 +1071,16 @@ class NeutronRestProxyV2(db_base_plugin_v2.NeutronDbPluginV2,
             # update network on network controller
             self._send_update_network(orig_net, context)
 
+    def disassociate_floatingips(self, context, port_id):
+        LOG.debug(_("NeutronRestProxyV2: diassociate_floatingips() called"))
+        super(NeutronRestProxyV2, self).disassociate_floatingips(context,
+                                                                 port_id)
+        port = super(NeutronRestProxyV2, self).get_port(context, port_id)
+        net_id = port['network_id']
+        orig_net = super(NeutronRestProxyV2, self).get_network(context,
+                                                               net_id)
+        self._send_update_network(orig_net, context)
+
     def _send_all_data(self):
         """Pushes all data to network ctrl (networks/ports, ports/attachments).