Dont log about skipping notification in normal case
Avoid logging about a missing resource for normal cases where there is no resource in the request (e.g. HTTP GET's, custom actions, etc). Change-Id: I04c6b6737f238ca6250869b92e1d0771b4f95f22 Partial-Bug: #1707307
This commit is contained in:
parent
863fb129f9
commit
f8fb73aa30
@ -65,15 +65,15 @@ class NotifierHook(hooks.PecanHook):
|
||||
resource_name = state.request.context.get('resource')
|
||||
collection_name = state.request.context.get('collection')
|
||||
neutron_context = state.request.context.get('neutron_context')
|
||||
if not resource_name:
|
||||
LOG.debug("Skipping NotifierHook processing as there was no "
|
||||
"resource associated with the request")
|
||||
return
|
||||
action = pecan_constants.ACTION_MAP.get(state.request.method)
|
||||
if not action or action not in ('create', 'update', 'delete'):
|
||||
return
|
||||
if utils.is_member_action(utils.get_controller(state)):
|
||||
return
|
||||
if not resource_name:
|
||||
LOG.debug("Skipping NotifierHook processing as there was no "
|
||||
"resource associated with the request")
|
||||
return
|
||||
if state.response.status_int > 300:
|
||||
LOG.debug("No notification will be sent due to unsuccessful "
|
||||
"status code: %s", state.response.status_int)
|
||||
|
Loading…
Reference in New Issue
Block a user