Fix neutron-ovn-db-sync-util issues
Two places needed to pass the _plugin_context like the mech driver already does since PortContext has no session. There was also a place where a port object was passed instead of a port id. Closes-Bug: #1879502 Change-Id: I19ee7b0cf4f8ab187e0a9025eece1ad3525e58e4
This commit is contained in:
parent
ba05201e0e
commit
21405378f0
|
@ -63,7 +63,7 @@ class OVNMechanismDriver(mech_driver.OVNMechanismDriver):
|
|||
|
||||
def create_port_postcommit(self, context):
|
||||
port = context.current
|
||||
self.ovn_client.create_port(context, port)
|
||||
self.ovn_client.create_port(context._plugin_context, port)
|
||||
|
||||
def update_port_precommit(self, context):
|
||||
pass
|
||||
|
@ -71,7 +71,8 @@ class OVNMechanismDriver(mech_driver.OVNMechanismDriver):
|
|||
def update_port_postcommit(self, context):
|
||||
port = context.current
|
||||
original_port = context.original
|
||||
self.ovn_client.update_port(context, port, original_port)
|
||||
self.ovn_client.update_port(context._plugin_context, port,
|
||||
original_port)
|
||||
|
||||
def delete_port_precommit(self, context):
|
||||
pass
|
||||
|
@ -81,7 +82,7 @@ class OVNMechanismDriver(mech_driver.OVNMechanismDriver):
|
|||
port['network'] = context.network.current
|
||||
# FIXME(lucasagomes): PortContext does not have a session, therefore
|
||||
# we need to use the _plugin_context attribute.
|
||||
self.ovn_client.delete_port(context._plugin_context, port)
|
||||
self.ovn_client.delete_port(context._plugin_context, port['id'])
|
||||
|
||||
|
||||
class AgentNotifierApi(object):
|
||||
|
|
Loading…
Reference in New Issue