def main(args, evpc=None): """ Creates a new VPC and related services, modeled from a YAML template. :param args: The parsed arguments and flags from the CLI. :param evpc: :meth:`botoform.enriched.vpc.EnrichedVPC` or None. :returns: None """ # TODO: tags not implemented, not used. Pass to template or builder? aws_tags = key_value_to_dict(args.tags) # get extra_vars (context_vars) from command line. context_vars = key_value_to_dict(args.extra_vars) # get directionary from ArgParse Namespace object and merge into context_vars. context_vars.update(vars(args)) loader = ConfigLoader(context_vars=context_vars) config = loader.load(template_path=args.config) ebuilder = EnvironmentBuilder(args.vpc_name, config, args.region, args.profile) if args.dry_run: print(config) return None ebuilder.apply_all()
def main(args, evpc=None): """ Creates a new VPC and related services, modeled from a YAML template. :param args: The parsed arguments and flags from the CLI. :param evpc: :meth:`botoform.enriched.vpc.EnrichedVPC` or None. :returns: None """ # TODO: tags not implemented, not used. Pass to template or builder? aws_tags = key_value_to_dict(args.tags) # get extra_vars (context_vars) from command line. context_vars = key_value_to_dict(args.extra_vars) # get directionary from ArgParse Namespace object and merge into context_vars. context_vars.update(vars(args)) loader = ConfigLoader(context_vars = context_vars) config = loader.load(template_path = args.config) ebuilder = EnvironmentBuilder( args.vpc_name, config, args.region, args.profile) if args.dry_run: print(config) return None ebuilder.apply_all()
def main(args, evpc): """Output a list of instance names. (example botoform plugin)""" context_vars = key_value_to_dict(args.vars) aws_tags = key_value_to_dict(args.tags) loader = ConfigLoader(context_vars=context_vars) config = loader.load(template_path=args.config) ebuilder = EnvironmentBuilder(args.vpc_name, config, args.region, args.profile) ebuilder.build_vpc(args.cidrblock) ebuilder.apply_all()
def main(args, evpc=None): """ Creates a new VPC and related services, modeled from a YAML template. :param args: The parsed arguments and flags from the CLI. :param evpc: :meth:`botoform.enriched.vpc.EnrichedVPC` or None. :returns: None """ extra_vars = key_value_to_dict(args.extra_vars) aws_tags = key_value_to_dict(args.tags) loader = ConfigLoader(context_vars = extra_vars) config = loader.load(template_path = args.config) ebuilder = EnvironmentBuilder( args.vpc_name, config, args.region, args.profile) ebuilder.apply_all()
def main(args, evpc=None): """ Creates a new VPC and related services, modeled from a YAML template. :param args: The parsed arguments and flags from the CLI. :param evpc: :meth:`botoform.enriched.vpc.EnrichedVPC` or None. :returns: None """ extra_vars = key_value_to_dict(args.extra_vars) aws_tags = key_value_to_dict(args.tags) loader = ConfigLoader(context_vars=extra_vars) config = loader.load(template_path=args.config) ebuilder = EnvironmentBuilder(args.vpc_name, config, args.region, args.profile) ebuilder.apply_all()