Example #1
0
    def __init__(self):
        super(NeutronRestProxyV2, self).__init__()
        LOG.info(_LI('NeutronRestProxy: Starting plugin. Version=%s'),
                 version.version_string_with_vcs())
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        # Include the Big Switch Extensions path in the api_extensions
        neutron_extensions.append_api_extensions_path(extensions.__path__)

        self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route

        # init network ctrl connections
        self.servers = servermanager.ServerPool()
        self.servers.get_topo_function = self._get_all_data
        self.servers.get_topo_function_args = {'get_ports': True,
                                               'get_floating_ips': True,
                                               'get_routers': True,
                                               'get_sgs': True}

        self.network_scheduler = importutils.import_object(
            cfg.CONF.network_scheduler_driver
        )

        # setup rpc for security and DHCP agents
        self._setup_rpc()

        if cfg.CONF.RESTPROXY.sync_data:
            self._send_all_data_auto()

        self.add_periodic_dhcp_agent_status_check()
        LOG.debug("NeutronRestProxyV2: initialization done")
    def __init__(self):
        super(NeutronRestProxyV2, self).__init__()
        LOG.info(_LI('NeutronRestProxy: Starting plugin. Version=%s'),
                 version.version_string_with_vcs())
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        # Include the Big Switch Extensions path in the api_extensions
        neutron_extensions.append_api_extensions_path(extensions.__path__)

        self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route

        # init network ctrl connections
        self.servers = servermanager.ServerPool()
        self.servers.get_topo_function = self._get_all_data
        self.servers.get_topo_function_args = {'get_ports': True,
                                               'get_floating_ips': True,
                                               'get_routers': True,
                                               'get_sgs': True}

        self.network_scheduler = importutils.import_object(
            cfg.CONF.network_scheduler_driver
        )

        # setup rpc for security and DHCP agents
        self._setup_rpc()

        if cfg.CONF.RESTPROXY.sync_data:
            self._send_all_data_auto()

        self.add_periodic_dhcp_agent_status_check()
        LOG.debug("NeutronRestProxyV2: initialization done")
    def initialize(self):
        LOG.debug('Initializing driver')

        # register plugin config opts
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        LOG.debug("Force topology sync if consistency hash is empty")
        hash_handler = cdb.HashHandler()
        cur_hash = hash_handler.read_for_update()
        if not cur_hash:
            hash_handler.put_hash('intial:hash,code')
            LOG.debug("Force topology sync Done")

        # init network ctrl connections
        self.servers = servermanager.ServerPool()
        self.servers.get_topo_function = self._get_all_data_auto
        self.segmentation_types = ', '.join(cfg.CONF.ml2.type_drivers)
        # Track hosts running IVS to avoid excessive calls to the backend
        self.vswitch_host_cache = {}
        self.setup_sg_rpc_callbacks()
        self.unsupported_vnic_types = [
            portbindings.VNIC_DIRECT, portbindings.VNIC_DIRECT_PHYSICAL
        ]

        LOG.debug("Initialization done")
Example #4
0
def main():
    config.init(sys.argv[1:])
    config.setup_logging()
    pl_config.register_config()

    integ_br = cfg.CONF.RESTPROXYAGENT.integration_bridge
    polling_interval = cfg.CONF.RESTPROXYAGENT.polling_interval
    bsnagent = RestProxyAgent(integ_br, polling_interval,
                              cfg.CONF.RESTPROXYAGENT.virtual_switch_type)
    bsnagent.daemon_loop()
    sys.exit(0)
def main():
    config.init(sys.argv[1:])
    config.setup_logging()
    pl_config.register_config()

    integ_br = cfg.CONF.RESTPROXYAGENT.integration_bridge
    polling_interval = cfg.CONF.RESTPROXYAGENT.polling_interval
    bsnagent = RestProxyAgent(integ_br, polling_interval,
                              cfg.CONF.RESTPROXYAGENT.virtual_switch_type)
    bsnagent.daemon_loop()
    sys.exit(0)
Example #6
0
 def setup_config_files(self):
     etc_path = os.path.join(os.path.dirname(__file__), 'etc')
     test_lib.test_config['config_files'] = [os.path.join(etc_path,
                                             'restproxy.ini.test')]
     self.addCleanup(cfg.CONF.reset)
     self.addCleanup(consistency_db.clear_db)
     config.register_config()
     # Only try SSL on SSL tests
     cfg.CONF.set_override('server_ssl', False, 'RESTPROXY')
     cfg.CONF.set_override('ssl_cert_directory',
                           os.path.join(etc_path, 'ssl'), 'RESTPROXY')
     # The mock interferes with HTTP(S) connection caching
     cfg.CONF.set_override('cache_connections', False, 'RESTPROXY')
     cfg.CONF.set_override('service_plugins', ['bigswitch_l3'])
     cfg.CONF.set_override('add_meta_server_route', False, 'RESTPROXY')
Example #7
0
    def initialize(self):
        LOG.debug('Initializing driver')

        # register plugin config opts
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        # init network ctrl connections
        self.servers = servermanager.ServerPool()
        self.servers.get_topo_function = self._get_all_data_auto
        self.segmentation_types = ', '.join(cfg.CONF.ml2.type_drivers)
        # Track hosts running IVS to avoid excessive calls to the backend
        self.ivs_host_cache = {}
        self.setup_sg_rpc_callbacks()
        LOG.debug(_("Initialization done"))
 def setup_config_files(self):
     etc_path = os.path.join(os.path.dirname(__file__), 'etc')
     test_lib.test_config['config_files'] = [
         os.path.join(etc_path, 'restproxy.ini.test')
     ]
     self.addCleanup(cfg.CONF.reset)
     self.addCleanup(consistency_db.clear_db)
     config.register_config()
     # Only try SSL on SSL tests
     cfg.CONF.set_override('server_ssl', False, 'RESTPROXY')
     etc_path = os.path.join(os.path.dirname(__file__), 'etc')
     cfg.CONF.set_override('ssl_cert_directory',
                           os.path.join(etc_path, 'ssl'), 'RESTPROXY')
     # The mock interferes with HTTP(S) connection caching
     cfg.CONF.set_override('cache_connections', False, 'RESTPROXY')
     cfg.CONF.set_override('service_plugins', ['bigswitch_l3'])
     cfg.CONF.set_override('add_meta_server_route', False, 'RESTPROXY')
     cfg.CONF.set_override('api_extensions_path', False)
    def initialize(self):
        LOG.debug('Initializing driver')

        # register plugin config opts
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        LOG.debug("Force topology sync if consistency hash is empty")
        hash_handler = cdb.HashHandler()
        cur_hash = hash_handler.read_for_update()
        if not cur_hash:
            hash_handler.put_hash('intial:hash,code')
            LOG.debug("Force topology sync Done")

        # init network ctrl connections
        self.servers = servermanager.ServerPool()
        self.servers.get_topo_function = self._get_all_data_auto
        self.segmentation_types = ', '.join(cfg.CONF.ml2.type_drivers)
        # Track hosts running IVS to avoid excessive calls to the backend
        self.vswitch_host_cache = {}
        self.setup_sg_rpc_callbacks()
        LOG.debug("Initialization done")
 def setUp(self):
     pl_config.register_config()
     super(BaseAgentTestCase, self).setUp()
     self.mod_agent = importutils.import_module(AGENTMOD)
 def setUp(self):
     pl_config.register_config()
     super(BaseAgentTestCase, self).setUp()
     self.mod_agent = importutils.import_module(AGENTMOD)