Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton
openstack-neutron-doc
0007-Fix-Multiple-Active-HA-routers-with-notify...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0007-Fix-Multiple-Active-HA-routers-with-notify-port-update-to-agent-for-status-change.patch of Package openstack-neutron-doc
Index: neutron-9.4.2.dev21/neutron/plugins/ml2/plugin.py =================================================================== --- neutron-9.4.2.dev21.orig/neutron/plugins/ml2/plugin.py +++ neutron-9.4.2.dev21/neutron/plugins/ml2/plugin.py @@ -1388,6 +1388,8 @@ class Ml2Plugin(db_base_plugin_v2.Neutro if original_port['admin_state_up'] != updated_port['admin_state_up']: need_port_update_notify = True + if original_port['status'] != updated_port['status']: + need_port_update_notify = True # NOTE: In the case of DVR ports, the port-binding is done after # router scheduling when sync_routers is called and so this call # below may not be required for DVR routed interfaces. But still Index: neutron-9.4.2.dev21/neutron/tests/unit/plugins/ml2/test_plugin.py =================================================================== --- neutron-9.4.2.dev21.orig/neutron/tests/unit/plugins/ml2/test_plugin.py +++ neutron-9.4.2.dev21/neutron/tests/unit/plugins/ml2/test_plugin.py @@ -732,6 +732,16 @@ class TestMl2PortsV2(test_plugin.TestPor self.assertEqual('DOWN', port['port']['status']) self.assertEqual('DOWN', self.port_create_status) + def test_notify_port_updated_for_status_change(self): + ctx = context.get_admin_context() + plugin = manager.NeutronManager.get_plugin() + with self.port() as port: + with mock.patch.object(self.plugin, + '_notify_port_updated') as notify_mock: + port['port']['status'] = constants.PORT_STATUS_ACTIVE + plugin.update_port(ctx, port['port']['id'], port) + self.assertTrue(notify_mock.called) + def test_update_port_status_short_id(self): ctx = context.get_admin_context() plugin = manager.NeutronManager.get_plugin()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor