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: