From dac10c4c8a07879329d6088a2253a09266b0d0df Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Wed, 9 Mar 2016 12:21:57 -0800 Subject: [PATCH] remove unneeded param from _create_port_at_the_backend port_data contains the same info as neturon_db which is already passed so we can drop neutron_db from being passsed. Change-Id: I2f0da34e291a9e93a1c08f3e2040b1821f9149b2 --- vmware_nsx/plugins/nsx_v3/plugin.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index a75b9a2c56..e5b5d41683 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -684,9 +684,8 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin, name = port_data['name'] return name - def _create_port_at_the_backend(self, context, neutron_db, - port_data, l2gw_port_check, - psec_is_on): + def _create_port_at_the_backend(self, context, port_data, + l2gw_port_check, psec_is_on): device_owner = port_data.get('device_owner') device_id = port_data.get('device_id') if device_owner == const.DEVICE_OWNER_DHCP: @@ -746,8 +745,8 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin, # TODO(salv-orlando): The logical switch identifier in the # mapping object is not necessary anymore. nsx_db.add_neutron_nsx_port_mapping( - context.session, neutron_db['id'], - neutron_db['network_id'], result['id']) + context.session, port_data['id'], + port_data['network_id'], result['id']) return result def _validate_address_pairs(self, address_pairs): @@ -833,8 +832,7 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin, if not is_external_net: try: lport = self._create_port_at_the_backend( - context, neutron_db, port_data, - l2gw_port_check, is_psec_on) + context, port_data, l2gw_port_check, is_psec_on) if sgids: security.update_lport_with_security_groups(