Hey Steve, how does something like this look:
notifications.py ------------------------
Add: enabled_events = {}
which will read from the conf and eventually generate something like:
enabled_events = { "resource_type": {'user', 'group'}, "operation": {ACTIONS.created} }
and in: def _create_cadf_payload(operation, resource_type, resource_id, outcome, initiator):
we add: if resource_type in enabled_events.get("resource_type") and \ operation in enabled_events.get("operation"):
to the top of the function.
Hey Steve, how does something like this look:
notifications.py ------- ------- ---
-------
Add:
enabled_events = {}
which will read from the conf and eventually generate something like:
enabled_events = { type": {'user', 'group'},
"resource_
"operation": {ACTIONS.created}
}
and in: cadf_payload( operation, resource_type, resource_id,
outcome, initiator):
def _create_
we add: events. get("resource_ type") and \
operation in enabled_ events. get("operation" ):
if resource_type in enabled_
to the top of the function.