Skip to content

Commit 28e0818

Browse files
committed
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 (cherry picked from commit ffc1509)
1 parent 7b376c7 commit 28e0818

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ def set_port_status_down(self, port_id):
13211321

13221322
if self._should_notify_nova(db_port):
13231323
self._plugin.nova_notifier.record_port_status_changed(
1324-
db_port, const.PORT_STATUS_ACTIVE, const.PORT_STATUS_DOWN,
1324+
db_port, const.PORT_STATUS_DOWN, const.PORT_STATUS_ACTIVE,
13251325
None)
13261326
self._plugin.nova_notifier.send_port_status(
13271327
None, None, db_port)

neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ def _test_set_port_status_down(self, is_compute_port=False):
12361236
else:
12371237
self.mech_driver._plugin.nova_notifier.\
12381238
record_port_status_changed.assert_called_once_with(
1239-
mock.ANY, const.PORT_STATUS_ACTIVE,
1240-
const.PORT_STATUS_DOWN, None)
1239+
mock.ANY, const.PORT_STATUS_DOWN,
1240+
const.PORT_STATUS_ACTIVE, None)
12411241
self.mech_driver._plugin.nova_notifier.\
12421242
send_port_status.assert_called_once_with(
12431243
None, None, mock.ANY)

0 commit comments

Comments
 (0)