def __init__(self): super(OpenDaylightL3RouterPlugin, self).__init__() # TODO(rcurran): Continue investigation into how many journal threads # to run per neutron controller deployment. self.journal = journal.OpenDaylightJournalThread() full_sync.register(plugin_constants.L3, L3_RESOURCES)
def setUp(self): cfg.CONF.set_override("core_plugin", 'neutron.plugins.ml2.plugin.Ml2Plugin') cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight_v2'], 'ml2') self.useFixture(odl_base.OpenDaylightRestClientFixture()) cfg.CONF.set_override("service_plugins", ['odl-router_v2']) core_plugin = cfg.CONF.core_plugin service_plugins = {'l3_plugin_name': 'odl-router_v2'} self.useFixture(odl_base.OpenDaylightJournalThreadFixture()) mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, '_record_in_journal').start() mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, 'sync_from_callback_precommit').start() mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, 'sync_from_callback_postcommit').start() self.useFixture(odl_base.OpenDaylightPeriodicTaskFixture()) self.useFixture(odl_base.OpenDaylightFeaturesFixture()) self.useFixture(odl_base.OpenDaylightPseudoAgentPrePopulateFixture()) super(OpenDaylightL3TestCase, self).setUp(plugin=core_plugin, service_plugins=service_plugins) self.plugin = directory.get_plugin() self.plugin._network_is_external = mock.Mock(return_value=True) self.driver = directory.get_plugin(constants.L3) self.thread = journal.OpenDaylightJournalThread() self.driver.get_floatingip = mock.Mock( return_value={ 'router_id': ROUTER_ID, 'floating_network_id': NETWORK_ID })
def __init__(self, driver, obj_type): LOG.debug("Initializing OpenDaylight LBaaS driver") super(OpenDaylightManager, self).__init__(driver) self.journal = journal.OpenDaylightJournalThread() self.obj_type = obj_type full_sync.register(nlib_const.LOADBALANCERV2, LBAAS_RESOURCES) self.driver = driver
def setUp(self): self.cfg = self.useFixture(config_fixture.Config()) self.cfg.config(core_plugin='neutron.plugins.ml2.plugin.Ml2Plugin') self.cfg.config(mechanism_drivers=['logger', 'opendaylight_v2'], group='ml2') self.useFixture(odl_base.OpenDaylightRestClientFixture()) self.cfg.config(service_plugins=['odl-router_v2']) core_plugin = cfg.CONF.core_plugin service_plugins = {'l3_plugin_name': 'odl-router_v2'} self.useFixture(odl_base.OpenDaylightJournalThreadFixture()) mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, '_record_in_journal').start() mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, 'sync_from_callback_precommit').start() mock.patch.object(mech_driver_v2.OpenDaylightMechanismDriver, 'sync_from_callback_postcommit').start() self.useFixture(odl_base.OpenDaylightPeriodicTaskFixture()) self.useFixture(odl_base.OpenDaylightFeaturesFixture()) self.useFixture(odl_base.OpenDaylightPseudoAgentPrePopulateFixture()) super(OpenDaylightL3TestCase, self).setUp(plugin=core_plugin, service_plugins=service_plugins) self.plugin = directory.get_plugin() self.plugin._network_is_external = mock.Mock(return_value=True) self.driver = directory.get_plugin(constants.L3) self.thread = journal.OpenDaylightJournalThread()
def setUp(self): self.journal_thread_fixture = self.useFixture( base.OpenDaylightJournalThreadFixture()) self.useFixture(base.OpenDaylightRestClientFixture()) self.useFixture(base.OpenDaylightFullSyncFixture()) super(OpenDaylightConfigBase, self).setUp() self.thread = journal.OpenDaylightJournalThread()
def __init__(self, l3_plugin): super(ODLL3ServiceProvider, self).__init__(l3_plugin) self.journal = journal.OpenDaylightJournalThread() # TODO(yamahata): add method for fullsync to retrieve # all the router with odl service provider. # other router with other service provider should be filtered. full_sync.register(plugin_constants.L3, L3_RESOURCES) self.odl_provider = __name__ + "." + self.__class__.__name__
def __init__(self, service_plugin): LOG.info("Initializing OpenDaylight BGPVPN v2 driver") super(OpenDaylightBgpvpnDriver, self).__init__(service_plugin) self.journal = journal.OpenDaylightJournalThread() full_sync.register(bgpvpn_const.ALIAS, BGPVPN_RESOURCES, self.get_resources) if odl_features.has(BGPVPN_VNI): self.more_supported_extension_aliases = [bgpvpn_vni_def.ALIAS]
def __init__(self): super(JournalPeriodicProcessor, self).__init__() self._journal = journal.OpenDaylightJournalThread(start_thread=False) self._interval = cfg.CONF.ml2_odl.sync_timeout self._timer = None self._maintenance_task = None self._running = None self.pidfile = None
def setUp(self): self.journal_thread_fixture = self.useFixture( base.OpenDaylightJournalThreadFixture()) self.useFixture(base.OpenDaylightRestClientFixture()) self.useFixture(base.OpenDaylightFullSyncFixture()) super(OpenDaylightConfigBase, self).setUp() self.thread = journal.OpenDaylightJournalThread() self.addCleanup(base_driver.ALL_RESOURCES.clear)
def setUp(self): self.useFixture(base.OpenDaylightJournalThreadFixture()) self.useFixture(base.OpenDaylightRestClientFixture()) super(OpenDaylightConfigBase, self).setUp() cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight_v2'], 'ml2') cfg.CONF.set_override('extension_drivers', ['port_security', 'qos'], 'ml2') self.thread = journal.OpenDaylightJournalThread()
def test_terminate_journal_thread_correctly(self, mock_journal): self.journal_thread_fixture.journal_thread_mock.stop() self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start) journal_thread = journal.OpenDaylightJournalThread(start_thread=True) journal_thread.stop(5) self.assertTrue(not journal_thread._odl_sync_thread.is_alive()) mock_journal.assert_called_once()
def test_allow_multiple_starts_gracefully(self, mock_journal): self.journal_thread_fixture.journal_thread_mock.stop() self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start) journal_thread = journal.OpenDaylightJournalThread(start_thread=False) self.addCleanup(journal_thread.stop) journal_thread.start() try: journal_thread.start() except RuntimeError: self.fail('OpenDaylightJournalThread started twice')
def setUp(self): self.journal_thread_fixture = self.useFixture( base.OpenDaylightJournalThreadFixture()) self.useFixture(base.OpenDaylightRestClientFixture()) self.useFixture(base.OpenDaylightFullSyncFixture()) super(OpenDaylightConfigBase, self).setUp() self.cfg.config(mechanism_drivers=['logger', 'opendaylight_v2'], group='ml2') self.cfg.config(extension_drivers=['port_security', 'qos'], group='ml2') self.thread = journal.OpenDaylightJournalThread()
def __init__(self, supported_rules, name='OpenDaylightQosDriver', vif_types=VIF_TYPES, vnic_types=VNIC_TYPES, requires_rpc_notifications=False): super(OpenDaylightQosDriver, self).__init__(name, vif_types, vnic_types, supported_rules, requires_rpc_notifications) LOG.debug("Initializing OpenDaylight Qos driver") self.journal = journal.OpenDaylightJournalThread() full_sync.register(nlib_const.QOS, QOS_RESOURCES)
def setUp(self): self.useFixture(base.OpenDaylightRestClientFixture()) super(OpenDaylightConfigBase, self).setUp() cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight_v2'], 'ml2') cfg.CONF.set_override('extension_drivers', ['port_security', 'qos'], 'ml2') self.mock_sync_thread = mock.patch.object( journal.OpenDaylightJournalThread, 'start_odl_sync_thread').start() self.mock_mt_thread = mock.patch.object(maintenance.MaintenanceThread, 'start').start() self.thread = journal.OpenDaylightJournalThread()
def initialize(self): LOG.debug("Initializing OpenDaylight ML2 driver") cfg.CONF.register_opts(odl_conf.odl_opts, "ml2_odl") self.sg_handler = callback.OdlSecurityGroupsHandler( self.sync_from_callback_precommit, self.sync_from_callback_postcommit) self.journal = journal.OpenDaylightJournalThread() self.port_binding_controller = port_binding.PortBindingManager.create() self.trunk_driver = trunk_driver.OpenDaylightTrunkDriverV2.create() if odl_const.ODL_QOS in cfg.CONF.ml2.extension_drivers: qos_driver.OpenDaylightQosDriver.create() self._start_maintenance_thread() odl_features.init()
def initialize(self): LOG.debug("Initializing OpenDaylight ML2 driver") cfg.CONF.register_opts(odl_conf.odl_opts, "ml2_odl") self.sg_handler = callback.OdlSecurityGroupsHandler( self.sync_from_callback_precommit, self.sync_from_callback_postcommit) self.journal = journal.OpenDaylightJournalThread() self.port_binding_controller = port_binding.PortBindingManager.create() self.trunk_driver = trunk_driver.OpenDaylightTrunkDriverV2.create() if odl_const.ODL_QOS in cfg.CONF.ml2.extension_drivers: qos_driver.OpenDaylightQosDriver.create() if cfg.CONF.ml2_odl.enable_dhcp_service: self.dhcp_driver = dhcp_driver.OdlDhcpDriver() full_sync.register(nlib_const.CORE, L2_RESOURCES) odl_features.init()
def initialize(self): LOG.debug("Initializing OpenDaylight Networking " "SFC Flow Classifier driver Version 2") self.journal = journal.OpenDaylightJournalThread()
def initialize(self): LOG.debug("Initializing OpenDaylight Networking SFC driver(Version 2)") self.journal = journal.OpenDaylightJournalThread()
def __init__(self, service_plugin, validator=None): super(OpenDaylightL2gwDriver, self).__init__(service_plugin, validator) self.service_plugin = service_plugin self.journal = journal.OpenDaylightJournalThread() full_sync.register(constants.L2GW, L2GW_RESOURCES) LOG.info("ODL: Started OpenDaylight L2Gateway V2 driver")
def __init__(self, driver, obj_type): LOG.debug("Initializing OpenDaylight LBaaS driver") super(OpenDaylightManager, self).__init__(driver) self.journal = journal.OpenDaylightJournalThread() self.obj_type = obj_type
def __init__(self): cfg.CONF.register_opts(odl_conf.odl_opts, "ml2_odl") self.journal = journal.OpenDaylightJournalThread() full_sync.register(t_consts.TRUNK, TRUNK_RESOURCES) LOG.info('initialized trunk driver for OpendayLight')
def __init__(self): super(OpenDaylightL3RouterPlugin, self).__init__() self.journal = journal.OpenDaylightJournalThread() full_sync.register(plugin_constants.L3, L3_RESOURCES)
def initialize(self): LOG.debug("Initializing OpenDaylight Networking SFC driver(Version 2)") self.journal = journal.OpenDaylightJournalThread() full_sync.register(sfc_const.SFC_EXT, SFC_RESOURCES)
def __init__(self, service_plugin, validator=None): super(OpenDaylightL2gwDriver, self).__init__(service_plugin, validator) self.service_plugin = service_plugin self.journal = journal.OpenDaylightJournalThread() LOG.info("ODL: Started OpenDaylight L2Gateway V2 driver")
def setUp(self): super(OpenDaylightJournalThreadTest, self).setUp() self.journal = journal.OpenDaylightJournalThread() self.addCleanup(self.cleanup)
def __init__(self): cfg.CONF.register_opts(odl_conf.odl_opts, "ml2_odl") self.journal = journal.OpenDaylightJournalThread() LOG.info('initialized trunk driver for OpendayLight')
def __init__(self, service_plugin): LOG.info("Initializing OpenDaylight BGPVPN v2 driver") super(OpenDaylightBgpvpnDriver, self).__init__(service_plugin) self.journal = journal.OpenDaylightJournalThread()
def __init__(self, service_plugin): LOG.info("Initializing OpenDaylight BGPVPN v2 driver") super(OpenDaylightBgpvpnDriver, self).__init__(service_plugin) self.journal = journal.OpenDaylightJournalThread() full_sync.register(bgpvpn_const.LABEL, BGPVPN_RESOURCES)
def initialize(self): LOG.debug("Initializing OpenDaylight Networking " "SFC Flow Classifier driver Version 2") self.journal = journal.OpenDaylightJournalThread() full_sync.register(fc_const.FLOW_CLASSIFIER_EXT, SFC_FC_RESOURCES)