def main(): cfg.CONF.register_opts(common_params.df_opts, 'df') common_config.init(sys.argv[1:]) config.setup_logging() service = PublisherService() service.initialize() service.run()
def _configure_agent(self, host): conf = self._get_config_opts() l3_agent_main.register_opts(conf) cfg.CONF.set_override('debug', False) agent_config.setup_logging() conf.set_override('interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') conf.set_override('router_delete_namespaces', True) br_int = self.useFixture(net_helpers.OVSBridgeFixture()).bridge br_ex = self.useFixture(net_helpers.OVSBridgeFixture()).bridge conf.set_override('ovs_integration_bridge', br_int.br_name) conf.set_override('external_network_bridge', br_ex.br_name) temp_dir = self.get_new_temp_dir() get_temp_file_path = functools.partial(self.get_temp_file_path, root=temp_dir) conf.set_override('state_path', temp_dir.path) conf.set_override('metadata_proxy_socket', get_temp_file_path('metadata_proxy')) conf.set_override('ha_confs_path', get_temp_file_path('ha_confs')) conf.set_override('external_pids', get_temp_file_path('external/pids')) conf.set_override('host', host) agent = neutron_l3_agent.L3NATAgentWithStateReport(host, conf) mock.patch.object(ip_lib, '_arping').start() return agent
def _configure_agent(self, host): conf = self._get_config_opts() l3_agent_main.register_opts(conf) cfg.CONF.set_override('debug', False) agent_config.setup_logging() conf.set_override( 'interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') conf.set_override('router_delete_namespaces', True) conf.set_override('root_helper', self.root_helper, group='AGENT') br_int = self.create_ovs_bridge() br_ex = self.create_ovs_bridge() conf.set_override('ovs_integration_bridge', br_int.br_name) conf.set_override('external_network_bridge', br_ex.br_name) temp_dir = self.get_new_temp_dir() get_temp_file_path = functools.partial(self.get_temp_file_path, root=temp_dir) conf.set_override('state_path', temp_dir.path) conf.set_override('metadata_proxy_socket', get_temp_file_path('metadata_proxy')) conf.set_override('ha_confs_path', get_temp_file_path('ha_confs')) conf.set_override('external_pids', get_temp_file_path('external/pids')) conf.set_override('host', host) agent = l3_test_agent.TestL3NATAgent(host, conf) mock.patch.object(ip_lib, 'send_gratuitous_arp').start() return agent
def setUp(self): super(DHCPAgentOVSTestFramework, self).setUp() config.setup_logging() self.conf_fixture = self.useFixture(fixture_config.Config()) self.conf = self.conf_fixture.conf dhcp_agent.register_options(self.conf) # NOTE(cbrandily): TempDir fixture creates a folder with 0o700 # permissions but agent dir must be readable by dnsmasq user (nobody) agent_config_dir = self.useFixture(fixtures.TempDir()).path self.useFixture( helpers.RecursivePermDirFixture(agent_config_dir, 0o555)) self.conf.set_override("dhcp_confs", agent_config_dir) self.conf.set_override( 'interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') self.conf.set_override('report_interval', 0, 'AGENT') br_int = self.useFixture(net_helpers.OVSBridgeFixture()).bridge self.conf.set_override('ovs_integration_bridge', br_int.br_name) self.mock_plugin_api = mock.patch( 'neutron.agent.dhcp.agent.DhcpPluginApi').start().return_value mock.patch('neutron.agent.rpc.PluginReportStateAPI').start() self.agent = agent.DhcpAgentWithStateReport('localhost') self.ovs_driver = interface.OVSInterfaceDriver(self.conf)
def _configure_agent(self, host): conf = self._get_config_opts() l3_agent_main.register_opts(conf) cfg.CONF.set_override('debug', False) agent_config.setup_logging() conf.set_override('interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') conf.set_override('router_delete_namespaces', True) conf.set_override('root_helper', self.root_helper, group='AGENT') br_int = self.create_ovs_bridge() br_ex = self.create_ovs_bridge() conf.set_override('ovs_integration_bridge', br_int.br_name) conf.set_override('external_network_bridge', br_ex.br_name) temp_dir = self.useFixture(fixtures.TempDir()).path conf.set_override('state_path', temp_dir) conf.set_override('metadata_proxy_socket', '%s/metadata_proxy' % temp_dir) conf.set_override('ha_confs_path', '%s/ha_confs' % temp_dir) conf.set_override('external_pids', '%s/external/pids' % temp_dir) conf.set_override('host', host) agent = l3_test_agent.TestL3NATAgent(host, conf) mock.patch.object(ip_lib, 'send_gratuitous_arp').start() return agent
def _configure_agent(self, host): conf = self._get_config_opts() l3_agent._register_opts(conf) cfg.CONF.set_override('debug', False) agent_config.setup_logging() conf.set_override( 'interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') conf.set_override('router_delete_namespaces', True) conf.set_override('root_helper', self.root_helper, group='AGENT') br_int = self.create_ovs_bridge() br_ex = self.create_ovs_bridge() conf.set_override('ovs_integration_bridge', br_int.br_name) conf.set_override('external_network_bridge', br_ex.br_name) temp_dir = self.useFixture(fixtures.TempDir()).path conf.set_override('state_path', temp_dir) conf.set_override('metadata_proxy_socket', '%s/metadata_proxy' % temp_dir) conf.set_override('ha_confs_path', '%s/ha_confs' % temp_dir) conf.set_override('external_pids', '%s/external/pids' % temp_dir) conf.set_override('host', host) agent = l3_test_agent.TestL3NATAgent(host, conf) mock.patch.object(agent, '_arping').start() return agent
def _configure_agent(self, host): """Override specific config options""" config = self._get_config_opts() l3_agent_main.register_opts(config) cfg.CONF.set_override("debug", True) agent_config.setup_logging() config.set_override("interface_driver", "neutron.agent.linux.interface.OVSInterfaceDriver") br_int = self.useFixture(net_helpers.OVSBridgeFixture()).bridge br_ex = self.useFixture(net_helpers.OVSBridgeFixture()).bridge config.set_override("ovs_integration_bridge", br_int.br_name) config.set_override("external_network_bridge", br_ex.br_name) temp_dir = self.get_new_temp_dir() get_temp_file_path = functools.partial(self.get_temp_file_path, root=temp_dir) config.set_override("state_path", temp_dir.path) config.set_override("metadata_proxy_socket", get_temp_file_path("metadata_proxy")) config.set_override("ha_confs_path", get_temp_file_path("ha_confs")) config.set_override("external_pids", get_temp_file_path("external/pids")) config.set_override("host", host) ipsec_config_base_dir = "%s/%s" % (temp_dir.path, "ipsec") config.set_override("config_base_dir", ipsec_config_base_dir, group="ipsec") config(["--config-file", self.vpn_agent_ini]) # Assign ip address to br-ex port because it is a gateway ex_port = ip_lib.IPDevice(br_ex.br_name) ex_port.addr.add(str(PUBLIC_NET[1])) return vpn_agent.VPNAgent(host, config)
def setUp(self): super(TestNetnsWrapper, self).setUp() config.setup_logging() self.fake_ns = 'func-8f1b728c-6eca-4042-9b6b-6ef66ab9352a' self.mount_paths = ('--mount_paths=/etc:/var/lib/neutron' '/vpnaas/%(ns)s/etc,/var/run:/var/lib' '/neutron/vpnaas/%(ns)s/var/run') self.fake_pth = self.mount_paths % {'ns': self.fake_ns}
def _configure(self): config.setup_logging() config.register_interface_driver_opts_helper(cfg.CONF) cfg.CONF.set_override( 'interface_driver', 'neutron.agent.linux.interface.OVSInterfaceDriver') cfg.CONF.register_opts(interface.OPTS) self.driver = importutils.import_object(cfg.CONF.interface_driver, cfg.CONF)
def main(manager='neutron.services.tunnel.agent.TunnelAgentWithStateReport'): common_config.init(sys.argv[1:]) config.setup_logging(cfg.CONF) server = neutron_service.Service.create( binary='neutron-tunnel-agent', topic=n_topics.TUNNEL_AGENT, report_interval=cfg.CONF.tunnel_agent.report_interval, manager=manager) service.launch(server).wait()
def launch(binary, manager, topic=None): cfg.CONF(project='neutron') common_cfg.init(sys.argv[1:]) config.setup_logging() report_period = cfg.CONF.ml2_cisco_apic.apic_agent_report_interval poll_period = cfg.CONF.ml2_cisco_apic.apic_agent_poll_interval server = service.Service.create( binary=binary, manager=manager, topic=topic, report_interval=report_period, periodic_interval=poll_period) svc.launch(cfg.CONF, server).wait()
def main(manager=FWAAS_AGENT): register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-l3-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(cfg.CONF, server).wait()
def main(): register_options() common_config.init(sys.argv[1:]) config.setup_logging(cfg.CONF) server = neutron_service.Service.create( binary='neutron-dhcp-agent', topic=topics.DHCP_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron.agent.dhcp_agent.DhcpAgentWithStateReport') service.launch(server).wait()
def main(): register_options(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-dhcp-agent', topic=topics.DHCP_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron.agent.dhcp.agent.DhcpAgentWithStateReport') service.launch(cfg.CONF, server).wait()
def main(): config.register_agent_state_opts_helper(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() hyperv_agent = HyperVNeutronAgent() # Start everything. LOG.info(_LI("Agent initialized successfully, now running... ")) hyperv_agent.daemon_loop()
def main(): register_options() common_config.init(sys.argv[1:]) config.setup_logging() hyperv_agent = l2_agent.HyperVNeutronAgent() # Start everything. LOG.info(_LI("Agent initialized successfully, now running... ")) hyperv_agent.daemon_loop()
def main(manager='neutron.agent.l3_highperformance_agent.L3NATAgentWithStateReport'): _register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-l3-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()
def main(manager='neutron.agent.l3.agent.L3NATAgentWithStateReport'): register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-l3-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(cfg.CONF, server).wait()
def launch(binary, manager, topic=None): cfg.CONF(project='neutron') common_cfg.init(sys.argv[1:]) config.setup_logging() report_period = cfg.CONF.ml2_cisco_apic.apic_agent_report_interval poll_period = cfg.CONF.ml2_cisco_apic.apic_agent_poll_interval server = service.Service.create( binary=binary, manager=manager, topic=topic, report_interval=report_period, periodic_interval=poll_period) svc.launch(server).wait()
def main(): cfg.CONF.register_opts(WANTC_OPTS, 'WANTC') common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='tc_agent2', topic=topics.TC_AGENT, report_interval=10, manager='wan_qos.agent.tc_manager.TcAgentManager') service.launch(cfg.CONF, server).wait()
def main(manager='networking_odl.controlle.LocalController'): register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='local-controller', report_interval=1, periodic_interval=cfg.CONF.proxy_periodic_interval, manager=manager) service.launch(cfg.CONF, server).wait()
def main(manager='neutron.agent.l3_data_engine.L3DataEngineWithStateReport'): _register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-l3-data-engine', topic='%s-%s' % (topics.L3_DATAENGINE, cfg.CONF.agent_index), report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()
def main(): eventlet.monkey_patch() register_options() cfg.CONF(project='neutron') config.setup_logging(cfg.CONF) server = neutron_service.Service.create( binary='neutron-dhcp-agent', topic=topics.DHCP_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron.agent.dhcp_agent.DhcpAgentWithStateReport') service.launch(server).wait()
def main(): register_options() common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-bgp-dragent', topic=bgp_consts.BGP_DRAGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron_dynamic_routing.services.bgp.agent.bgp_dragent.' 'BgpDrAgentWithStateReport') service.launch(cfg.CONF, server).wait()
def main(manager='dragonflow.neutron.agent.l3.l3_controller_agent.' 'L3ControllerAgentWithStateReport'): l3_agent.register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() cfg.CONF.set_override('router_delete_namespaces', True) server = neutron_service.Service.create( binary='neutron-l3-controller-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(cfg.CONF, server).wait()
def main(manager="neutron.services.skycloud.portforward_agent.PortForwardAgent"): eventlet.monkey_patch() conf = cfg.CONF conf(project='neutron') config.setup_logging(conf) legacy.modernize_quantum_config(conf) server = neutron_service.Service.create( binary='neutron-portforward-agent', topic=skycloud_constants.PORT_FORWARD_AGENT_TOPIC, report_interval=60, host=conf.host, manager=manager) service.launch(server).wait()
def main(manager='neutron.services.vm.agent' '.agent.ServiceVMAgentWithStateReport'): conf = cfg.CONF _register_options(conf) common_config.init(sys.argv[1:]) conf(project='neutron') config.setup_logging(conf) server = neutron_service.Service.create( binary='neutron-servicevm-agent', topic=topics.SERVICEVM_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()
def main(): conf = cfg.CONF conf.register_opts(MeteringAgent.Opts) config.register_agent_state_opts_helper(conf) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-metering-agent', topic=topics.METERING_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron.services.metering.agents.' 'metering_agent.MeteringAgentWithStateReport') service.launch(cfg.CONF, server).wait()
def main(manager='networking_zte.l3.zenic_agent.ZenicAgentWithStateReport'): register_opts(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-zenic-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) try: service.launch(server).wait() except Exception: service.launch(cfg.CONF, server).wait()
def main(): conf = cfg.CONF conf.register_opts(QosAgent.Opts) config.register_agent_state_opts_helper(conf) config.register_root_helper(conf) common_config.init(sys.argv[1:]) config.setup_logging() server = neutron_service.Service.create( binary='neutron-qos-agent', topic=qos_rpc_agent_api.QOS_AGENT, manager='neutron.services.qos.agents.' 'qos_agent.QosAgentWithStateReport') service.launch(server).wait()
def main(): cfg.CONF.register_opts(OPTS) cfg.CONF.register_opts(manager.OPTS) # import interface options just in case the driver uses namespaces cfg.CONF.register_opts(interface.OPTS) config.register_interface_driver_opts_helper(cfg.CONF) config.register_agent_state_opts_helper(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() mgr = manager.LbaasAgentManager(cfg.CONF) svc = LbaasAgentService(host=cfg.CONF.host, topic=l_const.LOADBALANCER_AGENT, manager=mgr) service.launch(cfg.CONF, svc).wait()
def main(): eventlet.monkey_patch() conf = cfg.CONF conf.register_opts(MeteringAgent.Opts) config.register_agent_state_opts_helper(conf) config.register_root_helper(conf) conf(project='neutron') config.setup_logging(conf) server = neutron_service.Service.create( binary='neutron-metering-agent', topic=topics.METERING_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager='neutron.services.metering.agents.' 'metering_agent.MeteringAgentWithStateReport') service.launch(server).wait()
def initialize_app(self, argv): super(NeutronDebugShell, self).initialize_app(argv) if not self.options.config_file: raise exc.CommandError( _("You must provide a config file for bridge -" " either --config-file or env[NEUTRON_TEST_CONFIG_FILE]")) client = self.client_manager.neutron cfg.CONF.register_opts(interface.OPTS) cfg.CONF.register_opts(config.EXT_NET_BRIDGE_OPTS) config.register_interface_driver_opts_helper(cfg.CONF) cfg.CONF(['--config-file', self.options.config_file]) config.setup_logging() driver = utils.load_interface_driver(cfg.CONF) self.debug_agent = debug_agent.NeutronDebugAgent( cfg.CONF, client, driver)
def main(): cfg.CONF.register_opts(OPTS) cfg.CONF.register_opts(manager.OPTS) config.register_root_helper(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() mgr = manager.LbaasProxyManager(cfg.CONF) svc = LbaasProxyService( host=cfg.CONF.host, topic='%s-%s' % (topics.LOADBALANCER_INTEGRATION, cfg.CONF.cluster_name), manager=mgr) service.launch(svc).wait()
def initialize_app(self, argv): super(NeutronDebugShell, self).initialize_app(argv) if not self.options.config_file: raise exc.CommandError( _("You must provide a config file for bridge -" " either --config-file or env[NEUTRON_TEST_CONFIG_FILE]")) client = self.client_manager.neutron cfg.CONF.register_opts(interface.OPTS) cfg.CONF.register_opts(NeutronDebugAgent.OPTS) config.register_root_helper(cfg.CONF) cfg.CONF(['--config-file', self.options.config_file]) config.setup_logging(cfg.CONF) legacy.modernize_quantum_config(cfg.CONF) driver = importutils.import_object(cfg.CONF.interface_driver, cfg.CONF) self.debug_agent = NeutronDebugAgent(cfg.CONF, client, driver)
def main(): print(sys.argv) print(sys.argv[1:]) print(sys.argv) args = parse_args() register_options() conf = aci_config.CONF common_config.init(config_files(args.config_file)) config.setup_logging() tool = AciTool(args, conf) tool.run()
def main(manager='neutron.plugins.cisco.cfg_agent.' 'cfg_agent.CiscoCfgAgentWithStateReport'): conf = cfg.CONF conf.register_opts(CiscoCfgAgent.OPTS, "cfg_agent") config.register_agent_state_opts_helper(conf) conf.register_opts(interface.OPTS) conf.register_opts(external_process.OPTS) common_config.init(sys.argv[1:]) conf(project='neutron') config.setup_logging() server = neutron_service.Service.create( binary='neutron-cisco-cfg-agent', topic=c_constants.CFG_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()
def main(): cfg.CONF.register_opts(OPTS) cfg.CONF.register_opts(manager.OPTS) config.register_root_helper(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() mgr = manager.LbaasProxyManager(cfg.CONF) svc = LbaasProxyService( host=cfg.CONF.host, topic='%s-%s' % (topics.LOADBALANCER_INTEGRATION, cfg.CONF.cluster_name), manager=mgr ) service.launch(svc).wait()
def main(): cfg.CONF.register_opts(OPTS) cfg.CONF.register_opts(manager.OPTS) # import interface options just in case the driver uses namespaces cfg.CONF.register_opts(interface.OPTS) config.register_interface_driver_opts_helper(cfg.CONF) config.register_agent_state_opts_helper(cfg.CONF) common_config.init(sys.argv[1:]) config.setup_logging() mgr = manager.LbaasAgentManager(cfg.CONF) svc = LbaasAgentService(host=cfg.CONF.host, topic=topics.LOADBALANCER_AGENT, manager=mgr) service.launch(svc).wait()
def main(manager='networking_cisco.plugins.cisco.cfg_agent.' 'cfg_agent.CiscoCfgAgentWithStateReport'): conf = cfg.CONF config.register_agent_state_opts_helper(conf) config.register_root_helper(conf) conf.register_opts(interface.OPTS) conf.register_opts(external_process.OPTS) common_config.init(sys.argv[1:]) conf(project='neutron') config.setup_logging() server = neutron_service.Service.create( binary='neutron-cisco-cfg-agent', topic=c_constants.CFG_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(cfg.CONF, server).wait()
def initialize_app(self, argv): super(NeutronDebugShell, self).initialize_app(argv) if not self.options.config_file: raise exc.CommandError( _("You must provide a config file for bridge -" " either --config-file or env[NEUTRON_TEST_CONFIG_FILE]")) client = self.client_manager.neutron cfg.CONF.register_opts(interface.OPTS) cfg.CONF.register_opts(config.EXT_NET_BRIDGE_OPTS) config.register_interface_driver_opts_helper(cfg.CONF) cfg.CONF(['--config-file', self.options.config_file]) config.setup_logging() driver = utils.load_interface_driver(cfg.CONF) self.debug_agent = debug_agent.NeutronDebugAgent(cfg.CONF, client, driver)
def main(manager='neutron.agent.l3_agent.L3NATAgentWithStateReport'): conf = cfg.CONF conf.register_opts(L3NATAgent.OPTS) config.register_interface_driver_opts_helper(conf) config.register_use_namespaces_opts_helper(conf) config.register_agent_state_opts_helper(conf) config.register_root_helper(conf) conf.register_opts(interface.OPTS) conf.register_opts(external_process.OPTS) common_config.init(sys.argv[1:]) config.setup_logging(conf) server = neutron_service.Service.create( binary='neutron-l3-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()
def main(manager='neutron.agent.l3_agent.L3NATAgentWithStateReport'): eventlet.monkey_patch() conf = cfg.CONF conf.register_opts(L3NATAgent.OPTS) config.register_agent_state_opts_helper(conf) config.register_root_helper(conf) conf.register_opts(interface.OPTS) conf.register_opts(external_process.OPTS) conf(project='neutron') config.setup_logging(conf) legacy.modernize_quantum_config(conf) server = neutron_service.Service.create( binary='neutron-l3-agent', topic=topics.L3_AGENT, report_interval=cfg.CONF.AGENT.report_interval, manager=manager) service.launch(server).wait()