How to use the stacker.ui.ui.info function in stacker

To help you get started, we’ve selected a few stacker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudtools / stacker / stacker / plan.py View on Github external
def log_step(step):
    msg = "%s: %s" % (step, step.status.name)
    if step.status.reason:
        msg += " (%s)" % (step.status.reason)
    color_code = COLOR_CODES.get(step.status.code, 37)
    ui.info(msg, extra={"color": color_code})
github cloudtools / stacker / stacker / actions / diff.py View on Github external
old_template = parse_cloudformation_template(old_template)
            if isinstance(old_template, str):
                # YAML templates returned from CFN need parsing again
                # "AWSTemplateFormatVersion: \"2010-09-09\"\nParam..."
                # ->
                # AWSTemplateFormatVersion: "2010-09-09"
                old_template = parse_cloudformation_template(old_template)
            old_stack = normalize_json(
                json.dumps(old_template,
                           sort_keys=True,
                           indent=4,
                           default=str)
            )
            output.extend(build_stack_changes(stack.name, new_stack, old_stack,
                                              new_params, old_params))
        ui.info('\n' + '\n'.join(output))

        stack.set_outputs(
            provider.get_output_dict(provider_stack))

        return COMPLETE