예제 #1
0
def step_impl(context, stack_name):
    sceptre_context = SceptreContext(command_path=stack_name + '.yaml',
                                     project_path=context.sceptre_dir,
                                     ignore_dependencies=True)

    sceptre_plan = SceptrePlan(sceptre_context)
    context.output = list(sceptre_plan.describe_resources().values())
예제 #2
0
def step_impl(context, stack_group_name):
    sceptre_context = SceptreContext(command_path=stack_group_name,
                                     project_path=context.sceptre_dir,
                                     ignore_dependencies=True)

    sceptre_plan = SceptrePlan(sceptre_context)
    context.response = sceptre_plan.describe_resources().values()
예제 #3
0
파일: list.py 프로젝트: isotoma/sceptre
def list_resources(ctx, path):
    """
    List resources for stack or stack_group.

    :param path: Path to execute the command on.
    :type path: str
    """
    context = SceptreContext(command_path=path,
                             project_path=ctx.obj.get("project_path"),
                             user_variables=ctx.obj.get("user_variables"),
                             options=ctx.obj.get("options"),
                             output_format=ctx.obj.get("output_format"))
    plan = SceptrePlan(context)

    responses = [
        response for response in plan.describe_resources().values() if response
    ]

    write(list(responses), context.output_format)