def setup_conf(): ovs_conf.register_ovs_agent_opts(cfg.CONF) lb_conf.register_linuxbridge_opts(cfg.CONF) ml2_conf.register_ml2_plugin_opts(cfg.CONF) securitygroups_rpc.register_securitygroups_opts(cfg.CONF) dhcp_agent.register_options(cfg.CONF) l3_hamode_db.register_db_l3_hamode_opts(cfg.CONF)
def setup_conf(): ovs_conf.register_ovs_agent_opts(cfg.CONF) lb_conf.register_linuxbridge_opts(cfg.CONF) ml2_conf.register_ml2_plugin_opts(cfg.CONF) securitygroups_rpc.register_securitygroups_opts(cfg.CONF) dhcp_agent.register_options(cfg.CONF) l3_hamode_db.register_db_l3_hamode_opts(cfg.CONF)
def set_config_fixture(self, config_type=ConfigTypes.MINIMAL_CONFIG): ml2_config.register_ml2_plugin_opts() conf = self.useFixture(oslo_fixture.Config(cfg.CONF)) conf.config(group='RESTPROXY', server='localhost:9876') conf.config(group='RESTPROXY', server_timeout=1) conf.config(group='RESTPROXY', server_max_retries=1) conf.config(group='RESTPROXY', cms_id='1') conf.config(group='PLUGIN', enable_debug='api_stats') if config_type == ConfigTypes.MISSING_SERVICE_PLUGIN: conf.config(service_plugins=['NuagePortAttributes', 'NuageL3']) else: conf.config( service_plugins=['NuagePortAttributes', 'NuageL3', 'NuageAPI']) if config_type == ConfigTypes.MISSING_ML2_EXTENSION: conf.config(group='ml2', extension_drivers=['nuage_subnet', 'nuage_port']) else: conf.config(group='ml2', extension_drivers=[ 'nuage_subnet', 'nuage_port', 'port_security' ]) if config_type == ConfigTypes.NUAGE_L2BRIDGE_WITHOUT_NUAGE_NETWORK: conf.config(service_plugins=[ 'NuagePortAttributes', 'NuageL3', 'NuageAPI', 'NuageL2Bridge' ]) return conf
def setup_conf(): config.register_common_config_options() ovs_conf.register_ovs_agent_opts(cfg.CONF) lb_conf.register_linuxbridge_opts(cfg.CONF) sriov_conf.register_agent_sriov_nic_opts(cfg.CONF) ml2_conf.register_ml2_plugin_opts(cfg.CONF) securitygroups_rpc.register_securitygroups_opts(cfg.CONF) dhcp_agent.register_options(cfg.CONF) l3_hamode_db.register_db_l3_hamode_opts(cfg.CONF) common_config.register_core_common_config_opts(cfg.CONF)
def setUp(self): # Enable the test mechanism driver to ensure that # we can successfully call through to all mechanism # driver apis. config.register_ml2_plugin_opts() cfg.CONF.set_override('mechanism_drivers', ['logger', 'test'], 'ml2') driver_type.register_ml2_drivers_vlan_opts() cfg.CONF.set_override('network_vlan_ranges', ['physnet1:1000:1099'], group='ml2_type_vlan') super(ExtendedPortBindingTestCase, self).setUp('ml2') self.port_create_status = 'DOWN' self.plugin = directory.get_plugin() self.plugin.start_rpc_listeners()
def setUp(self): # Enable the test mechanism driver to ensure that # we can successfully call through to all mechanism # driver apis. config.register_ml2_plugin_opts() cfg.CONF.set_override('mechanism_drivers', ['logger', 'test'], 'ml2') driver_type.register_ml2_drivers_vlan_opts() cfg.CONF.set_override('network_vlan_ranges', ['physnet1:1000:1099'], group='ml2_type_vlan') super(ExtendedPortBindingTestCase, self).setUp('ml2') self.port_create_status = 'DOWN' self.plugin = directory.get_plugin() self.plugin.start_rpc_listeners()
def setUp(self): super(OpflexTypeTest, self).setUp() config.register_ml2_plugin_opts() cfg.CONF.set_override('opflex_networks', OPFLEX_NETWORKS, group='OPFLEX') self.driver = type_opflex.OpflexTypeDriver()
import stevedore from neutron._i18n import _ from neutron.conf.plugins.ml2 import config from neutron.db import api as db_api from neutron.db import segments_db from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import vlantransparent from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2 import driver_api as api from neutron.plugins.ml2 import models LOG = log.getLogger(__name__) MAX_BINDING_LEVELS = 10 config.register_ml2_plugin_opts() class TypeManager(stevedore.named.NamedExtensionManager): """Manage network segment types using drivers.""" def __init__(self): # Mapping from type name to DriverManager self.drivers = {} LOG.info("Configured type driver names: %s", cfg.CONF.ml2.type_drivers) super(TypeManager, self).__init__('neutron.ml2.type_drivers', cfg.CONF.ml2.type_drivers, invoke_on_load=True) LOG.info("Loaded type driver names: %s", self.names())
def _setup_config(self): ml2_config.register_ml2_plugin_opts(cfg.CONF) cfg.CONF.set_override('core_plugin', 'neutron.conf.plugins.ml2.plugin.Ml2Plugin') ml2_config.cfg.CONF.set_override('type_drivers', 'local', group='ml2')
from oslo_config import cfg from oslo_log import log from oslo_utils import excutils import stevedore from neutron._i18n import _ from neutron.conf.plugins.ml2 import config from neutron.db import api as db_api from neutron.db import segments_db from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2 import models LOG = log.getLogger(__name__) MAX_BINDING_LEVELS = 10 config.register_ml2_plugin_opts() class TypeManager(stevedore.named.NamedExtensionManager): """Manage network segment types using drivers.""" def __init__(self): # Mapping from type name to DriverManager self.drivers = {} LOG.info("Configured type driver names: %s", cfg.CONF.ml2.type_drivers) super(TypeManager, self).__init__('neutron.ml2.type_drivers', cfg.CONF.ml2.type_drivers, invoke_on_load=True) LOG.info("Loaded type driver names: %s", self.names())