Merge "Fix _notify_l3_agent_port_update when there is no binding host"
This commit is contained in:
commit
fefd9a6bb1
|
@ -549,14 +549,14 @@ def _notify_l3_agent_port_update(resource, event, trigger, **kwargs):
|
|||
if new_port and original_port:
|
||||
l3plugin = directory.get_plugin(plugin_constants.L3)
|
||||
context = kwargs['context']
|
||||
new_port_host = new_port.get(portbindings.HOST_ID)
|
||||
original_port_host = original_port.get(portbindings.HOST_ID)
|
||||
is_new_port_binding_changed = (
|
||||
new_port[portbindings.HOST_ID] and
|
||||
new_port[portbindings.HOST_ID] !=
|
||||
original_port[portbindings.HOST_ID])
|
||||
new_port_host and
|
||||
new_port_host != original_port_host)
|
||||
is_bound_port_moved = (
|
||||
original_port[portbindings.HOST_ID] and
|
||||
original_port[portbindings.HOST_ID] !=
|
||||
new_port[portbindings.HOST_ID])
|
||||
original_port_host and
|
||||
original_port_host != new_port_host)
|
||||
fip_router_id = None
|
||||
dest_host = None
|
||||
new_port_profile = new_port.get(portbindings.PROFILE)
|
||||
|
|
|
@ -59,7 +59,7 @@ def _notify_l3_agent_ha_port_update(resource, event, trigger, **kwargs):
|
|||
new_port = kwargs.get('port')
|
||||
original_port = kwargs.get('original_port')
|
||||
context = kwargs.get('context')
|
||||
host = new_port[portbindings.HOST_ID]
|
||||
host = new_port.get(portbindings.HOST_ID)
|
||||
|
||||
if new_port and original_port and host:
|
||||
new_device_owner = new_port.get('device_owner', '')
|
||||
|
|
Loading…
Reference in New Issue