Merge "use payloads for NETWORK BEFORE_DELETE events"
This commit is contained in:
commit
cf4992cab7
@ -461,8 +461,9 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
||||
|
||||
@lib_db_api.retry_if_session_inactive()
|
||||
def delete_network(self, context, id):
|
||||
registry.notify(resources.NETWORK, events.BEFORE_DELETE, self,
|
||||
context=context, network_id=id)
|
||||
registry.publish(resources.NETWORK, events.BEFORE_DELETE, self,
|
||||
payload=events.DBEventPayload(
|
||||
context, resource_id=id))
|
||||
self._ensure_network_not_in_use(context, id)
|
||||
with db_api.context_manager.reader.using(context):
|
||||
auto_delete_port_ids = [p.id for p in context.session.query(
|
||||
|
@ -243,5 +243,5 @@ class External_net_db_mixin(object):
|
||||
|
||||
@registry.receives(resources.NETWORK, [events.BEFORE_DELETE])
|
||||
def _before_network_delete_handler(self, resource, event, trigger,
|
||||
context, network_id, **kwargs):
|
||||
self._process_l3_delete(context, network_id)
|
||||
payload=None):
|
||||
self._process_l3_delete(payload.context, payload.resource_id)
|
||||
|
Loading…
Reference in New Issue
Block a user