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

This commit is contained in:
Zuul 2020-05-25 23:06:29 +00:00 committed by Gerrit Code Review
commit 207ac766f3
2 changed files with 3 additions and 1 deletions

View File

@ -272,6 +272,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)

View File

@ -371,7 +371,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,