From: Kevin Benton Date: Mon, 9 Jun 2014 18:50:30 +0000 (-0700) Subject: Big Switch: Add missing data to topology sync X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2d9488be71244cd7fcee624764b2f6c0cc5fe3a1;p=openstack-build%2Fneutron-build.git Big Switch: Add missing data to topology sync Adds data to the topology sync function that was missing in the case where it is called from the ML2 driver. Closes-Bug: #1328222 Change-Id: I1cc3b0430f63f62c881f28139d1e5ebf22766357 --- diff --git a/neutron/plugins/bigswitch/plugin.py b/neutron/plugins/bigswitch/plugin.py index 1e9621846..5e44d99a6 100644 --- a/neutron/plugins/bigswitch/plugin.py +++ b/neutron/plugins/bigswitch/plugin.py @@ -178,11 +178,13 @@ class NeutronRestProxyV2Base(db_base_plugin_v2.NeutronDbPluginV2, get_routers=True): admin_context = qcontext.get_admin_context() networks = [] - - all_networks = self.get_networks(admin_context) or [] + # this method is used by the ML2 driver so it can't directly invoke + # the self.get_(ports|networks) methods + plugin = manager.NeutronManager.get_plugin() + all_networks = plugin.get_networks(admin_context) or [] for net in all_networks: mapped_network = self._get_mapped_network_with_subnets(net) - flips_n_ports = {} + flips_n_ports = mapped_network if get_floating_ips: flips_n_ports = self._get_network_with_floatingips( mapped_network) @@ -190,8 +192,8 @@ class NeutronRestProxyV2Base(db_base_plugin_v2.NeutronDbPluginV2, if get_ports: ports = [] net_filter = {'network_id': [net.get('id')]} - net_ports = self.get_ports(admin_context, - filters=net_filter) or [] + net_ports = plugin.get_ports(admin_context, + filters=net_filter) or [] for port in net_ports: mapped_port = self._map_state_and_status(port) mapped_port['attachment'] = {