From dfc93afd3cc3d536e3da277e4f55dcdbbf56eee0 Mon Sep 17 00:00:00 2001 From: Rich Curran Date: Tue, 25 Mar 2014 10:56:46 -0400 Subject: [PATCH] ML2 Cisco Nexus MD: Remove workaround for bug 1276395 Before bug 1276395 was merged the delete_port_postcommit() mechanism drivers did not have access to the bound_segment information that was in the process of being deleted. Code was added to the cisco_nexus md to workaround this issue. This code can now be removed. Change-Id: If47ef1958bf4de863995b9cfc042abf5bc849e24 Closes-Bug: 1297321 --- .../ml2/drivers/cisco/nexus/mech_cisco_nexus.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py b/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py index 4f624b1c068..8f98f9fcae0 100644 --- a/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py +++ b/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py @@ -151,13 +151,7 @@ class CiscoNexusMechanismDriver(api.MechanismDriver): """Verify configuration and then process event.""" device_id = port.get('device_id') host_id = port.get(portbindings.HOST_ID) - - # Workaround until vlan can be retrieved during delete_port_postcommit - # event. - if func == self._delete_switch_entry: - vlan_id = self._delete_port_postcommit_vlan - else: - vlan_id = self._get_vlanid(segment) + vlan_id = self._get_vlanid(segment) if vlan_id and device_id and host_id: func(vlan_id, device_id, host_id) @@ -167,13 +161,6 @@ class CiscoNexusMechanismDriver(api.MechanismDriver): fields += "host_id" if not host_id else "" raise excep.NexusMissingRequiredFields(fields=fields) - # Workaround until vlan can be retrieved during delete_port_postcommit - # event. - if func == self._delete_nxos_db: - self._delete_port_postcommit_vlan = vlan_id - else: - self._delete_port_postcommit_vlan = 0 - def update_port_precommit(self, context): """Update port pre-database transaction commit event."""