From: Jenkins Date: Mon, 24 Mar 2014 07:36:58 +0000 (+0000) Subject: Merge "ML2 Cisco Nexus MD: VM migration support" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ec30b11fe5989fcca2b2d6bab780e7968c6ee130;p=openstack-build%2Fneutron-build.git Merge "ML2 Cisco Nexus MD: VM migration support" --- ec30b11fe5989fcca2b2d6bab780e7968c6ee130 diff --cc neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py index eca142a42,d36f0d3f0..4f624b1c0 --- a/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py +++ b/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py @@@ -147,13 -142,18 +142,18 @@@ class CiscoNexusMechanismDriver(api.Mec except excep.NexusPortBindingNotFound: self.driver.delete_vlan(switch_ip, vlan_id) - def _port_action(self, context, func): + def _is_vm_migration(self, context): + if not context.bound_segment and context.original_bound_segment: + return (context.current.get(portbindings.HOST_ID) != + context.original.get(portbindings.HOST_ID)) + + def _port_action(self, port, segment, func): """Verify configuration and then process event.""" - device_id = context.current.get('device_id') - host_id = context.current.get(portbindings.HOST_ID) + device_id = port.get('device_id') + host_id = port.get(portbindings.HOST_ID) # Workaround until vlan can be retrieved during delete_port_postcommit - # (or prehaps unbind_port) event. + # event. if func == self._delete_switch_entry: vlan_id = self._delete_port_postcommit_vlan else: