def main():
args = parse_options()
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
store = ObjectStore()
backend = MockBackend(store, in_out_iface=args.in_out_iface,
in_out_stag=None if args.in_out_stag is None else int(args.in_out_stag))
agent = Agent(args.controller, int(args.datapath_id), store, backend)
store.set_agent(agent)
backend.set_agent(agent)
try:
agent.run()
except KeyboardInterrupt:
logging.info("Ctrl-c received! Shutting down connection and exiting...")
agent.stop()
backend.stop()
评论列表
文章目录