ConditionalStep (autotransform.step.conditional)
Conditions
Conditions are used by ConditionalStep to determine whether to take an Action. Provides a generic way for creating Steps that take action conditionally.
- Condition (autotransform.step.condition.base)
- Comparison (autotransform.step.condition.comparison)
- AggregateCondition (autotransform.step.condition.aggregate)
- Created Time Conditions (autotransform.step.condition.created)
- Reviewers Conditions (autotransform.step.condition.reviewers)
- Schema Conditions (autotransform.step.condition.schema)
- ChangeStateCondition (autotransform.step.condition.state)
- Updated Time Conditions (autotransform.step.condition.updated)
ConditionalStep
The implementation for the ConditionalStep.
- class autotransform.step.conditional.ConditionalStep(*, actions: List[Action], condition: Condition, continue_if_passed: bool = False)
Bases:
Step
A step which takes action based on whether a particular condition is passed. Allows for creating customized steps based on different Change attributes readily through JSON.
- continue_if_passed
Whether to continue on to the next step after performing the action if the condition passes. Defaults to False.
- Type
bool, optional
- continue_if_passed: bool
- continue_management(change: Change) bool
Checks if management should be continued after this Step when Actions were provided.
- Parameters
change (Change) – The Change the Step is running against.
- Returns
Whether to continue management.
- Return type
bool
- classmethod from_data(data: Dict[str, Any]) ConditionalStep
Produces an instance of the component from decoded data.
- Parameters
data (Mapping[str, Any]) – The JSON decoded data.
- Returns
An instance of the component.
- Return type