def register_options(conf): config.register_interface_driver_opts_helper(conf) config.register_agent_state_opts_helper(conf) config.register_availability_zone_opts_helper(conf) dhcp_config.register_agent_dhcp_opts(conf) meta_conf.register_meta_conf_opts(meta_conf.SHARED_OPTS, conf) conf.register_opts(interface.OPTS)
def register_options(conf): config.register_interface_driver_opts_helper(conf) config.register_agent_state_opts_helper(conf) config.register_availability_zone_opts_helper(conf) dhcp_config.register_agent_dhcp_opts(conf) meta_conf.register_meta_conf_opts(meta_conf.SHARED_OPTS, conf) conf.register_opts(interface.OPTS)
def setUp(self): dhcp_config.register_agent_dhcp_opts(cfg.CONF) super(TestEndpointFileManager, self).setUp() cfg.CONF.set_default('quitting_rpc_timeout', 10, 'AGENT') self.ep_dir = EP_DIR % _uuid() self.manager = self._initialize_agent() self.manager.nat_mtu_size = 9000 self._mock_agent(self.manager) self.addCleanup(self._purge_endpoint_dir)
def setup_conf(): """Setup the cfg for the clean up utility. Use separate setup_conf for the utility because there are many options from the main config that do not apply during clean-up. """ conf = cfg.CONF cmd.register_cmd_opts(cmd.netns_opts, conf) agent_config.register_interface_driver_opts_helper(conf) dhcp_config.register_agent_dhcp_opts(conf) conf.register_opts(interface.OPTS) return conf
def setup_conf(): """Setup the cfg for the clean up utility. Use separate setup_conf for the utility because there are many options from the main config that do not apply during clean-up. """ conf = cfg.CONF cmd.register_cmd_opts(cmd.netns_opts, conf) agent_config.register_interface_driver_opts_helper(conf) dhcp_config.register_agent_dhcp_opts(conf) agent_config.register_interface_opts() return conf
def main(): cfg.CONF.register_opts(ip_lib.OPTS) dhcp_config.register_agent_dhcp_opts(cfg.CONF) config.register_root_helper(cfg.CONF) common_config.init(sys.argv[1:]) common_config.setup_logging() config.setup_privsep() q_utils.log_opt_values(LOG) agent_mode = cfg.CONF.OPFLEX.agent_mode if agent_mode == 'dvs': agent = main_dvs() elif agent_mode == 'dvs_no_binding': agent = main_dvs(no_binding=True) else: agent = main_opflex() if not agent: sys.exit(1) LOG.info("Agent initialized successfully, now running... ") agent.daemon_loop()
def setup_conf(): """Setup the cfg for the clean up utility. Use separate setup_conf for the utility because there are many options from the main config that do not apply during clean-up. """ cli_opts = [ cfg.BoolOpt('force', default=False, help=_('Delete the namespace by removing all devices.')), cfg.StrOpt('agent-type', choices=['dhcp', 'l3', 'lbaas'], help=_('Cleanup resources of a specific agent type only.')), ] conf = cfg.CONF conf.register_cli_opts(cli_opts) agent_config.register_interface_driver_opts_helper(conf) dhcp_config.register_agent_dhcp_opts(conf) conf.register_opts(interface.OPTS) return conf