36 default=context_module.Context.root,
37 type=click.Path(file_okay=
False, dir_okay=
True))
38 @click.option(
'--logging-config')
39 @click.option(
'--debug', is_flag=
True)
40 @click.argument(
'iface')
41 @click.argument(
'bind')
42 def main(iface, bind, **args):
46 iface = model.TargetIface.new_from_cli(iface)
47 bind = model.BindAddress.new_from_cli(bind)
49 context = context_module.Context(iface, bind)
51 context.set_root(args[
'root'])
53 logging_config = args[
'logging_config']
56 context.set_logging_config(logging_config)
60 context.set_debug_mode(args[
'debug'])
68 rest.init(bind, context)
72 click.echo(str(e), err=
True)
73 sys.exit(const.CLI_ERROR_CODE_COMMON)
85 target_iface = iface_info_getter(context.iface.index)
87 context.acquire_resources(
91 if target_iface.kind !=
'bridge':
92 context.acquire_resources(
98 context.acquire_resources(
def main(iface, bind, args)
def __init__(self, children)
def setup_environment(context)