Merge "use payloads for SECURITY_GROUP BEFORE_CREATE events"

This commit is contained in:
Zuul 2019-02-21 00:04:02 +00:00 committed by Gerrit Code Review
commit c2b779d278

View File

@ -91,7 +91,12 @@ class ExtendedSecurityGroupPropertiesMixin(object):
}
self._registry_notify(resources.SECURITY_GROUP, events.BEFORE_CREATE,
exc_cls=ext_sg.SecurityGroupConflict, **kwargs)
exc_cls=ext_sg.SecurityGroupConflict,
payload=events.DBEventPayload(
context, metadata={'is_default': default_sg},
request_body=security_group,
desired_state=s))
tenant_id = s['tenant_id']
if not default_sg: