def notify(self, audit_uuid, event_type, status): event = watcher_event.Event() event.type = event_type event.data = {} payload = {'audit_uuid': audit_uuid, 'audit_status': status} self.messaging.status_topic_handler.publish_event( event.type.name, payload)
def notify(self, action, state): db_action = objects.Action.get_by_uuid(self.context, action.uuid) db_action.state = state db_action.save() ev = event.Event() ev.type = event_types.EventTypes.LAUNCH_ACTION ev.data = {} payload = {'action_uuid': action.uuid, 'action_state': state} self.applier_manager.publish_status_event(ev.type.name, payload)
def notify(self, uuid, event_type, state): action_plan = ap_objects.ActionPlan.get_by_uuid(self.ctx, uuid) action_plan.state = state action_plan.save() ev = event.Event() ev.type = event_type ev.data = {} payload = {'action_plan__uuid': uuid, 'action_plan_state': state} self.applier_manager.status_topic_handler.publish_event( ev.type.name, payload)
def fake_event(self, event_type): event = messaging_event.Event() event.type = event_type return event