<s> import argparse <EOL> import os <EOL> import yaml <EOL> from utils_refarch import load_refarch <EOL> from utils_refarch import render_jinja2_template <EOL> def render ( ) : <EOL> arch [ "<STR_LIT>" ] = yaml . dump ( arch , default_flow_style = False ) <EOL> for host in arch [ "<STR_LIT>" ] : <EOL> host [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> render_jinja2_template ( filename , "<STR_LIT>" , arch ) <EOL> def start ( ) : <EOL> print "<STR_LIT>" <EOL> def stop ( ) : <EOL> print "<STR_LIT>" <EOL> parser = argparse . ArgumentParser ( ) <EOL> parser . add_argument ( "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT:action>" , choices = [ <EOL> "<STR_LIT>" , "<STR_LIT:start>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , default = "<STR_LIT>" ) <EOL> args = parser . parse_args ( ) <EOL> try : <EOL> arch = load_refarch ( args . arch , args . domain ) <EOL> filename = args . output <EOL> if not filename : <EOL> filename = "<STR_LIT>" % os . path . basename ( <EOL> args . arch ) . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> except IOError : <EOL> print "<STR_LIT>" % args . arch <EOL> exit ( <NUM_LIT:1> ) <EOL> if args . action == "<STR_LIT:start>" : <EOL> start ( ) <EOL> elif args . action == "<STR_LIT>" : <EOL> stop ( ) <EOL> elif args . action == "<STR_LIT>" : <EOL> stop ( ) <EOL> start ( ) <EOL> elif args . action == "<STR_LIT>" : <EOL> render ( ) </s>
