Browse Source

Merge "Add sg name in after delete event kwargs" into stable/train

changes/29/727829/3
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
169535b155
2 changed files with 3 additions and 1 deletions
  1. +1
    -0
      neutron/db/securitygroups_db.py
  2. +2
    -1
      neutron/tests/unit/db/test_securitygroups_db.py

+ 1
- 0
neutron/db/securitygroups_db.py View File

@@ -271,6 +271,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase,
sg.delete()

kwargs.pop('security_group')
kwargs['name'] = sg['name']
registry.notify(resources.SECURITY_GROUP, events.AFTER_DELETE,
self, **kwargs)



+ 2
- 1
neutron/tests/unit/db/test_securitygroups_db.py View File

@@ -354,7 +354,8 @@ class SecurityGroupDbMixinTestCase(testlib_api.SqlTestCase):
mock.call('security_group', 'after_delete',
mock.ANY, context=mock.ANY,
security_group_id=sg_dict['id'],
security_group_rule_ids=[mock.ANY, mock.ANY])])
security_group_rule_ids=[mock.ANY, mock.ANY],
name=sg_dict['name'])])

def test_security_group_rule_precommit_create_event_fail(self):
registry.subscribe(fake_callback, resources.SECURITY_GROUP_RULE,


Loading…
Cancel
Save