Fix nova notification on port unplug

Wrong event was send on port unplug which is
misleading, this patch fixes it.

Closes-Bug: #2112569
Change-Id: I95f50519f1eaf9023804bcd36a8b8e834b53d140
This commit is contained in:
2025-06-05 19:49:14 +05:30
parent 66e0b19004
commit ffc1509325
2 changed files with 3 additions and 3 deletions

View File

@@ -1325,7 +1325,7 @@ class OVNMechanismDriver(api.MechanismDriver):
if self._should_notify_nova(db_port):
self._plugin.nova_notifier.record_port_status_changed(
db_port, const.PORT_STATUS_ACTIVE, const.PORT_STATUS_DOWN,
db_port, const.PORT_STATUS_DOWN, const.PORT_STATUS_ACTIVE,
None)
self._plugin.nova_notifier.send_port_status(
None, None, db_port)

View File

@@ -1238,8 +1238,8 @@ class TestOVNMechanismDriver(TestOVNMechanismDriverBase):
else:
self.mech_driver._plugin.nova_notifier.\
record_port_status_changed.assert_called_once_with(
mock.ANY, const.PORT_STATUS_ACTIVE,
const.PORT_STATUS_DOWN, None)
mock.ANY, const.PORT_STATUS_DOWN,
const.PORT_STATUS_ACTIVE, None)
self.mech_driver._plugin.nova_notifier.\
send_port_status.assert_called_once_with(
None, None, mock.ANY)