karbor.services.operationengine.engine.triggers package¶
Subpackages¶
- karbor.services.operationengine.engine.triggers.timetrigger package
Submodules¶
karbor.services.operationengine.engine.triggers.trigger_manager module¶
Manage all triggers.
-
class
karbor.services.operationengine.engine.triggers.trigger_manager.
TriggerManager
(executor)¶ 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
- Raises
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
- Raises
InvalidInput – if the trigger_type is invalid or other exceptionis unregister_operation of trigger raises
-
update_trigger
(trigger_id, trigger_property)¶
-
Module contents¶
-
class
karbor.services.operationengine.engine.triggers.
BaseTrigger
(trigger_id, trigger_property, executor)¶ Bases:
object
Trigger base class that all Triggers should inherit from
-
IS_ENABLED
= True¶
-
TRIGGER_TYPE
= ''¶
-
abstract classmethod
check_configuration
()¶
-
abstract classmethod
check_trigger_definition
(trigger_definition)¶
-
has_operations
()¶
-
abstract
register_operation
(operation_id, **kwargs)¶
-
abstract
shutdown
()¶
-
abstract
unregister_operation
(operation_id, **kwargs)¶
-
abstract
update_trigger_property
(trigger_property)¶
-
-
class
karbor.services.operationengine.engine.triggers.
TriggerHandler
¶ Bases:
karbor.loadables.BaseLoader
-
karbor.services.operationengine.engine.triggers.
all_triggers
()¶ Get all trigger classes.