The karbor.services.operationengine.engine.triggers.trigger_manager Module

Manage all triggers.

class karbor.services.operationengine.engine.triggers.trigger_manager.TriggerManager

Bases: object

Manage all trigger classes which are defined at triggers dir.

add_trigger(trigger_id, trigger_type, trigger_property)
check_trigger_definition(trigger_type, trigger_definition)

Check trigger definition

Parameters:
  • trigger_type – Type of trigger
  • trigger_definition – Definition of trigger
register_operation(trigger_id, operation_id, **kwargs)

Register operation definition.

Parameters:
  • trigger_id – The ID of the trigger which the operation is registered to
  • operation_id – ID of the operation
  • kwargs – Any parameters
:raise InvalidInput if the trigger_type is invalid or
other exceptionis register_operation of trigger raises
remove_trigger(trigger_id)
shutdown()
unregister_operation(trigger_id, operation_id, **kwargs)

Unregister operation.

Parameters:
  • trigger_id – The ID of the trigger which the operation is registered to
  • operation_id – ID of the operation
:raise InvalidInput if the trigger_type is invalid or
other exceptionis unregister_operation of trigger raises
update_trigger(trigger_id, trigger_property)