def main(argv): p = miniascape.options.option_parser() (options, args) = p.parse_args(argv[1:]) G.set_loglevel(options.verbose) options = miniascape.options.tweak_options(options) configure(options.ctxs, options.tmpldir, options.workdir)
def main(argv): p = option_parser() (options, args) = p.parse_args(argv[1:]) set_loglevel(options.verbose) options = O.tweak_options(options) bootstrap(options.site, options.workdir, options.site_template, tpaths=options.tmpldir)
def main(argv): p = option_parser() (options, args) = p.parse_args(argv[1:]) G.set_loglevel(options.verbose) options = O.tweak_options(options) cf = miniascape.config.ConfFiles(options.confdir) houtdir = os.path.join(options.workdir, G.M_HOST_CONF_SUBDIR) if os.path.exists(houtdir) and not options.force: yesno = raw_input("Are you sure to generate networks in {} ? " "[y/n]: ".format(options.workdir)) if not yesno.strip().lower().startswith('y'): print("Cancel creation of networks...") sys.exit(0) options.force = True gen_host_files(cf, options.tmpldir, options.workdir, options.force)
def main(argv=sys.argv): p = option_parser() (options, args) = p.parse_args(argv[1:]) G.set_loglevel(options.verbose) options = miniascape.options.tweak_options(options) cf = miniascape.config.ConfFiles(options.confdir) if not args and not options.genall: p.print_help() show_vm_names(cf) sys.exit(0) if options.genall: gen_all(cf, options.tmpldir, options.workdir) else: name = args[0] gen_guest_files(name, cf, options.tmpldir, _workdir(options.workdir, name))