Skip to content

support for automatic steps #40

@UnquietCode

Description

@UnquietCode

In the path towards automation, the idea of the runbook is to slowly swap out individual steps / methods in the class for automated actions, eventually cutting out the humans entirely. To facilitate this we need the concept of an automated step, one which does not prompt but performs an action and logs it.

Considerations include acceptance criteria, whether the user should confirm the action or just let it happen, repeatability, etc. Also right now the methods are invoked to return dynamic doc strings, so this behavior might be in conflict if the method has to run.

Some possible implementations:

def _deploy_cf_stack():
    pass

def deploy_cf_stack(action='_deploy_cf_stack'):
    """
    Deploys the CloudFormation stack with parameters
    derived from the previous steps.
    """
def deploy_cf_stack(auto=True):
    """
    Deploys the CloudFormation stack with parameters
    derived from the previous steps.
    """
    def action_fn():
        self.helper.deployStack()

    return StepInfo(description="dynamic docs!", action=action_fn)
def deploy_cf_stack(with_action):
    """
    Deploys the CloudFormation stack with parameters
    derived from the previous steps.
    """
    def action_fn():
        self.helper.deployStack()
    
    with_action(action_fn)
    return "dynamic docs"
def deploy_cf_stack(action):
    """
    Deploys the CloudFormation stack with parameters
    derived from the previous steps.
    """
    @action
    def do_deploy():
        self.helper.deployStack()
    
    return "dynamic docs"

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions