def _create_cadf_payload(operation, resource_type, resource_id, outcome, initiator, reason=None):
 if (resource_type not in CADF_TYPE_MAP):
  target_uri = taxonomy.UNKNOWN
 else:
  target_uri = CADF_TYPE_MAP.get(resource_type)
 target = resource.Resource(typeURI=target_uri, id=resource_id)
 audit_kwargs = {'resource_info': resource_id}
 cadf_action = ('%s.%s' % (operation, resource_type))
 event_type = ('%s.%s.%s' % (SERVICE, resource_type, operation))
 _send_audit_notification(cadf_action, initiator, outcome, target, event_type, reason=reason, **audit_kwargs)

def _create_cadf_payload ( operation , resource_type , resource_id , outcome , initiator , reason = None ) : if ( resource_type not in CADF_TYPE_MAP ) : target_uri = taxonomy . UNKNOWN else : target_uri = CADF_TYPE_MAP . get ( resource_type ) target = resource . Resource ( typeURI = target_uri , id = resource_id ) audit_kwargs = { 'resource_info' : resource_id } cadf_action = ( '%s.%s' % ( operation , resource_type ) ) event_type = ( '%s.%s.%s' % ( SERVICE , resource_type , operation ) ) _send_audit_notification ( cadf_action , initiator , outcome , target , event_type , reason = reason , ** audit_kwargs )
prepare data for cadf audit notifier .