pypz.executors.commons module

class pypz.executors.commons.ExecutionMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ResourceCreationOnly = 'ResourceCreationOnly'

In this mode the state machine will execute resource creation only. Note that services will be started before and stopped after resource creation.

ResourceDeletionOnly = 'ResourceDeletionOnly'

In this mode the state machine will execute resource deletion only. Note that services will be started before and stopped after resource creation.

Skip = 'Skip'

If this mode is set, then the executor will not be invoked. This is necessary e.g., in deployment cases, where we want to ignore the execution of certain operators.

Standard = 'Standard'

In this mode the state machine will follow its standard route. Note that Standard means that resources will be created and deleted up automatically. If you want to have a standard mode, where resources are only created, but not deleted, then use the WithoutResourceDeletion

WithoutResourceDeletion = 'WithoutResourceDeletion'

In this mode the state machine will follow its standard route. However the StateResourceDeletion will be skipped. This is a relevant use-case, if you want to trigger centralized resource cleanup after the operations are done.

class pypz.executors.commons.ExitCodes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

CommandCannotBeExecutedError = 126
CommandNotFoundError = 127
FatalError = 129
GeneralError = 1
InvalidExitArgumentError = 128
NoError = 0
SigTerm = 130
StateOperationError = 115
StateOperationInitError = 114
StateOperationShutdownError = 116
StateResourceCreationError = 112
StateResourcesDeletionError = 113
StateServiceShutdownError = 111
StateServiceStartError = 110