]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Revert dependency on oslo.config 1.2.0
authorMark McLoughlin <markmc@redhat.com>
Tue, 28 May 2013 20:51:09 +0000 (21:51 +0100)
committerMark McLoughlin <markmc@redhat.com>
Wed, 29 May 2013 05:54:55 +0000 (06:54 +0100)
Fixes bug #1185174

This reverts commit b8b2c4e2f13345362bd7f8da2fb7 and 956b873.

We don't yet have the infrastructure in place to use latest oslo.config
in the gate or even get the correct metadata for it in our packaging.

The gory details are here:

  http://lists.openstack.org/pipermail/openstack-dev/2013-May/009586.html

Change-Id: Idf89ca418df158e6f94279c9c5fa44f23073a9d7

37 files changed:
etc/quantum.conf
etc/quantum/plugins/nec/nec.ini
etc/quantum/plugins/nicira/nvp.ini
etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
etc/quantum/plugins/ryu/ryu.ini
quantum/db/migration/alembic_migrations/env.py
quantum/db/migration/cli.py
quantum/db/servicetype_db.py
quantum/extensions/l3.py
quantum/extensions/quotasv2.py
quantum/extensions/securitygroup.py
quantum/plugins/cisco/tests/unit/v2/quantumv2.conf.cisco.test
quantum/plugins/nec/agent/nec_quantum_agent.py
quantum/plugins/nec/common/config.py
quantum/plugins/nec/extensions/packetfilter.py
quantum/plugins/nicira/extensions/nvp_networkgw.py
quantum/plugins/openvswitch/agent/ovs_quantum_agent.py
quantum/plugins/openvswitch/common/config.py
quantum/plugins/openvswitch/ovs_quantum_plugin.py
quantum/plugins/ryu/agent/ryu_quantum_agent.py
quantum/plugins/ryu/common/config.py
quantum/plugins/ryu/ryu_quantum_plugin.py
quantum/quota.py
quantum/tests/etc/quantum.conf.test
quantum/tests/unit/cisco/test_network_plugin.py
quantum/tests/unit/nec/test_config.py
quantum/tests/unit/nicira/etc/quantum.conf.test
quantum/tests/unit/openvswitch/test_ovs_defaults.py
quantum/tests/unit/openvswitch/test_ovs_quantum_agent.py
quantum/tests/unit/ryu/test_defaults.py
quantum/tests/unit/ryu/test_ryu_agent.py
quantum/tests/unit/test_api_v2.py
quantum/tests/unit/test_db_plugin.py
quantum/tests/unit/test_quota_ext.py
quantum/tests/unit/test_routerserviceinsertion.py
quantum/tests/unit/test_servicetype.py
tools/pip-requires

index 1e37842a6713c693c58be64ab43f88ab63e8d3d3..5ea29a4ccbad4c608344ca7ce9db9cc71664acd6 100644 (file)
@@ -263,7 +263,7 @@ notification_topics = notifications
 #ssl_ca_file = /path/to/cafile
 # ======== end of WSGI parameters related to the API server ==========
 
-[quotas]
+[QUOTAS]
 # resource name(s) that are supported in quota features
 # quota_items = network,subnet,port
 
@@ -288,7 +288,7 @@ notification_topics = notifications
 # default driver to use for quota checks
 # quota_driver = quantum.quota.ConfDriver
 
-[default_servicetype]
+[DEFAULT_SERVICETYPE]
 # Description of the default service type (optional)
 # description = "default service type"
 # Enter a service definition line for each advanced service provided
index 9ceb09e1dae8f467787f51064abcc8243624e751..21737c50585e87cd74a5714d38574be3eef169f2 100644 (file)
@@ -23,7 +23,7 @@ reconnect_interval = 2
 # Timeout in seconds before idle sql connections are reaped
 # sql_idle_timeout = 3600
 
-[ovs]
+[OVS]
 # Do not change this parameter unless you have a good reason to.
 # This is the name of the OVS integration bridge. There is one per hypervisor.
 # The integration bridge acts as a virtual "patch port". All VM VIFs are
index 9eeaf3767a345751e077757f61c3104ddb7aa9bf..e46dc195e8bef1d09f05479864f63fab2904624e 100644 (file)
@@ -91,7 +91,7 @@ sql_connection = sqlite://
 # sql_idle_timeout = 3600
 
 
-[quotas]
+[QUOTAS]
 # number of network gateways allowed per tenant, -1 means unlimited
 # quota_network_gateway = 5
 
index 4138653029fa6da76c7697b3437568693d79c367..d0e1527b848a7584f3db959e9db0bba8d95a2cd9 100644 (file)
@@ -21,7 +21,7 @@ reconnect_interval = 2
 # Timeout in seconds before idle sql connections are reaped
 # sql_idle_timeout = 3600
 
-[ovs]
+[OVS]
 # (StrOpt) Type of network to allocate for tenant networks. The
 # default value 'local' is useful only for single-box testing and
 # provides no connectivity between hosts. You MUST either change this
@@ -108,7 +108,7 @@ polling_interval = 2
 # 1. With VLANs on eth1.
 # [DATABASE]
 # sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum
-# [ovs]
+# [OVS]
 # network_vlan_ranges = default:2000:3999
 # tunnel_id_ranges =
 # integration_bridge = br-int
@@ -119,7 +119,7 @@ polling_interval = 2
 # 2. With tunneling.
 # [DATABASE]
 # sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum
-# [ovs]
+# [OVS]
 # network_vlan_ranges =
 # tunnel_id_ranges = 1:1000
 # integration_bridge = br-int
index eb4c7ac5831766a80c020010e904167b85f2b01a..288d703c11575cd4fba4b11b2c7af987fc6ce5b3 100644 (file)
@@ -13,7 +13,7 @@ sql_connection = sqlite://
 # Timeout in seconds before idle sql connections are reaped
 # sql_idle_timeout = 3600
 
-[ovs]
+[OVS]
 integration_bridge = br-int
 
 # openflow_rest_api = <host IP address of ofp rest api service>:<port: 8080>
index ba1f9abdd4574f420a65a3f583bea5072b4f019d..32904977994776fd9566849f9ea4c7b088d1181b 100644 (file)
@@ -91,7 +91,7 @@ def build_options():
 
 
 def is_db_quota_enabled():
-    return quantum_config.quotas.quota_driver == DATABASE_QUOTA_DRIVER
+    return quantum_config.QUOTAS.quota_driver == DATABASE_QUOTA_DRIVER
 
 
 if context.is_offline_mode():
index cc9932163deac1e51f6d45cac78ccf24d07c3faf..8a033115be4fe4f36995ffcc2dc591b7b091d5a5 100644 (file)
@@ -45,7 +45,7 @@ _db_opts = [
 CONF = cfg.ConfigOpts()
 CONF.register_opts(_core_opts)
 CONF.register_opts(_db_opts, 'DATABASE')
-CONF.register_opts(_quota_opts, 'quotas')
+CONF.register_opts(_quota_opts, 'QUOTAS')
 
 
 def do_alembic_command(config, cmd, *args, **kwargs):
index db9417eb8ab06799ba08399ddf7838a92cb3bcc6..1fa1e5cb0df3382f4adaab364008ae58081eafa8 100644 (file)
@@ -43,13 +43,13 @@ default_servicetype_opts = [
                            'using the format: <service>:<plugin>[:<driver>]'))
 ]
 
-cfg.CONF.register_opts(default_servicetype_opts, 'default_servicetype')
+cfg.CONF.register_opts(default_servicetype_opts, 'DEFAULT_SERVICETYPE')
 
 
 def parse_service_definition_opt():
     """Parse service definition opts and returns result."""
     results = []
-    svc_def_opt = cfg.CONF.default_servicetype.service_definition
+    svc_def_opt = cfg.CONF.DEFAULT_SERVICETYPE.service_definition
     try:
         for svc_def_str in svc_def_opt:
             split = svc_def_str.split(':')
@@ -72,7 +72,7 @@ def parse_service_definition_opt():
 class NoDefaultServiceDefinition(q_exc.QuantumException):
     message = _("No default service definition in configuration file. "
                 "Please add service definitions using the service_definition "
-                "variable in the [default_servicetype] section")
+                "variable in the [DEFAULT_SERVICETYPE] section")
 
 
 class ServiceTypeNotFound(q_exc.NotFound):
@@ -129,12 +129,12 @@ class ServiceTypeManager(object):
         self._initialize_db()
         ctx = context.get_admin_context()
         # Init default service type from configuration file
-        svc_defs = cfg.CONF.default_servicetype.service_definition
+        svc_defs = cfg.CONF.DEFAULT_SERVICETYPE.service_definition
         if not svc_defs:
             raise NoDefaultServiceDefinition()
         def_service_type = {'name': DEFAULT_SVCTYPE_NAME,
                             'description':
-                            cfg.CONF.default_servicetype.description,
+                            cfg.CONF.DEFAULT_SERVICETYPE.description,
                             'service_definitions':
                             parse_service_definition_opt(),
                             'default': True}
index ba5285318eb516c37c6654bff8173bae16ffdb94..99691b1bf327f3c718ac641ba7893775a4a1b96d 100644 (file)
@@ -159,7 +159,7 @@ l3_quota_opts = [
                help=_('Number of floating IPs allowed per tenant, '
                       '-1 for unlimited')),
 ]
-cfg.CONF.register_opts(l3_quota_opts, 'quotas')
+cfg.CONF.register_opts(l3_quota_opts, 'QUOTAS')
 
 
 class L3(extensions.ExtensionDescriptor):
index 6ae86062ceea83f67ab8eb29702f965f41f8e06a..d49ffd3c4b148e4b053121ef3bbd72e9da3cb95a 100644 (file)
@@ -43,7 +43,7 @@ class QuotaSetsController(wsgi.Controller):
     def __init__(self, plugin):
         self._resource_name = RESOURCE_NAME
         self._plugin = plugin
-        self._driver = importutils.import_class(cfg.CONF.quotas.quota_driver)
+        self._driver = importutils.import_class(cfg.CONF.QUOTAS.quota_driver)
         self._update_extended_attributes = True
 
     def _update_attributes(self):
@@ -117,7 +117,7 @@ class Quotasv2(extensions.ExtensionDescriptor):
     @classmethod
     def get_description(cls):
         description = 'Expose functions for quotas management'
-        if cfg.CONF.quotas.quota_driver == DB_QUOTA_DRIVER:
+        if cfg.CONF.QUOTAS.quota_driver == DB_QUOTA_DRIVER:
             description += ' per tenant'
         return description
 
index 0e64a93ccdbed78a0541ed75c41471994c8511f8..3609af5a5cf48b5656e9763ee56a3e5c1ad23321 100644 (file)
@@ -216,7 +216,7 @@ security_group_quota_opts = [
                help=_('Number of security rules allowed per tenant, '
                       '-1 for unlimited')),
 ]
-cfg.CONF.register_opts(security_group_quota_opts, 'quotas')
+cfg.CONF.register_opts(security_group_quota_opts, 'QUOTAS')
 
 
 class Securitygroup(extensions.ExtensionDescriptor):
index 742d482c0ce66e68cc2bd96aede532d2db09db8e..dc855a7cc06cbb8f1d92558f34bbf0c944bbc7ad 100644 (file)
@@ -22,7 +22,7 @@ core_plugin = quantum.plugins.cisco.network_plugin.PluginV2
 # The messaging module to use, defaults to kombu.
 rpc_backend = quantum.openstack.common.rpc.impl_fake
 
-[quotas]
+[QUOTAS]
 # resource name(s) that are supported in quota features
 quota_items = network,subnet,port
 
index d025cdc8399a0c8e985a8f183e39fdbef682d537..00f1dd687cb604e69dbbc8fad61dd18215440475 100755 (executable)
@@ -233,7 +233,7 @@ def main():
     logging_config.setup_logging(config.CONF)
 
     # Determine which agent type to use.
-    integ_br = config.ovs.integration_bridge
+    integ_br = config.OVS.integration_bridge
     root_helper = config.AGENT.root_helper
     polling_interval = config.AGENT.polling_interval
 
index 38955766febd09bb3cd6dc24f4efa0231cf71b5c..8229a9f511ee2d7647d43e59669e227bb951bbdb 100644 (file)
@@ -51,7 +51,7 @@ ofc_opts = [
 ]
 
 
-cfg.CONF.register_opts(ovs_opts, "ovs")
+cfg.CONF.register_opts(ovs_opts, "OVS")
 cfg.CONF.register_opts(agent_opts, "AGENT")
 cfg.CONF.register_opts(ofc_opts, "OFC")
 config.register_agent_state_opts_helper(cfg.CONF)
@@ -60,6 +60,6 @@ cfg.CONF.register_opts(scheduler.AGENTS_SCHEDULER_OPTS)
 
 # shortcuts
 CONF = cfg.CONF
-OVS = cfg.CONF.ovs
+OVS = cfg.CONF.OVS
 AGENT = cfg.CONF.AGENT
 OFC = cfg.CONF.OFC
index 944050562c4a30ec10bf43f9cc63b3074e06cd82..fe3bb6f92a1a886cfc439441df59e4c00519907c 100644 (file)
@@ -34,7 +34,7 @@ quota_packet_filter_opts = [
                       "-1 for unlimited"))
 ]
 # Register the configuration options
-cfg.CONF.register_opts(quota_packet_filter_opts, 'quotas')
+cfg.CONF.register_opts(quota_packet_filter_opts, 'QUOTAS')
 
 
 PACKET_FILTER_ACTION_REGEX = "(?i)^(allow|accept|drop|deny)$"
index 0bc6cf2e98d78d795b699924882499f3e6df7707..97c88f60f85aac692e81c2f618977aa9c5f73359 100644 (file)
@@ -93,7 +93,7 @@ nw_gw_quota_opts = [
                       '-1 for unlimited'))
 ]
 
-cfg.CONF.register_opts(nw_gw_quota_opts, 'quotas')
+cfg.CONF.register_opts(nw_gw_quota_opts, 'QUOTAS')
 
 attributes.validators['type:device_list'] = _validate_device_list
 
index a6e4f0180e604bc1f4060f6f9c0945d5d1a72a97..19d06fe09e7061c63afa419f12661db02bc6dbff 100644 (file)
@@ -500,7 +500,7 @@ class OVSQuantumAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
         :returns: the integration bridge
         '''
         int_br = ovs_lib.OVSBridge(bridge_name, self.root_helper)
-        int_br.delete_port(cfg.CONF.ovs.int_peer_patch_port)
+        int_br.delete_port(cfg.CONF.OVS.int_peer_patch_port)
         int_br.remove_all_flows()
         # switch all traffic using L2 learning
         int_br.add_flow(priority=1, actions="normal")
@@ -517,9 +517,9 @@ class OVSQuantumAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
         self.tun_br = ovs_lib.OVSBridge(tun_br, self.root_helper)
         self.tun_br.reset_bridge()
         self.patch_tun_ofport = self.int_br.add_patch_port(
-            cfg.CONF.ovs.int_peer_patch_port, cfg.CONF.ovs.tun_peer_patch_port)
+            cfg.CONF.OVS.int_peer_patch_port, cfg.CONF.OVS.tun_peer_patch_port)
         self.patch_int_ofport = self.tun_br.add_patch_port(
-            cfg.CONF.ovs.tun_peer_patch_port, cfg.CONF.ovs.int_peer_patch_port)
+            cfg.CONF.OVS.tun_peer_patch_port, cfg.CONF.OVS.int_peer_patch_port)
         if int(self.patch_tun_ofport) < 0 or int(self.patch_int_ofport) < 0:
             LOG.error(_("Failed to create OVS patch port. Cannot have "
                         "tunneling enabled on this agent, since this version "
@@ -735,18 +735,18 @@ def create_agent_config_map(config):
     :returns: a map of agent configuration parameters
     """
     try:
-        bridge_mappings = q_utils.parse_mappings(config.ovs.bridge_mappings)
+        bridge_mappings = q_utils.parse_mappings(config.OVS.bridge_mappings)
     except ValueError as e:
         raise ValueError(_("Parsing bridge_mappings failed: %s.") % e)
 
     kwargs = dict(
-        integ_br=config.ovs.integration_bridge,
-        tun_br=config.ovs.tunnel_bridge,
-        local_ip=config.ovs.local_ip,
+        integ_br=config.OVS.integration_bridge,
+        tun_br=config.OVS.tunnel_bridge,
+        local_ip=config.OVS.local_ip,
         bridge_mappings=bridge_mappings,
         root_helper=config.AGENT.root_helper,
         polling_interval=config.AGENT.polling_interval,
-        enable_tunneling=config.ovs.enable_tunneling,
+        enable_tunneling=config.OVS.enable_tunneling,
     )
 
     if kwargs['enable_tunneling'] and not kwargs['local_ip']:
index 32fa8c864e1af661d90eaf7e3f4aded7fb577e1a..4886974ddf76062bf716e1731707fba5bf7354ba 100644 (file)
@@ -61,7 +61,7 @@ agent_opts = [
 ]
 
 
-cfg.CONF.register_opts(ovs_opts, "ovs")
+cfg.CONF.register_opts(ovs_opts, "OVS")
 cfg.CONF.register_opts(agent_opts, "AGENT")
 config.register_agent_state_opts_helper(cfg.CONF)
 config.register_root_helper(cfg.CONF)
index d3d14af12ed7ce51edb7672ef180ca537c65058e..70e2a5c55f7a668c7caceb4bbbebbaff07347a38 100644 (file)
@@ -263,7 +263,7 @@ class OVSQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
         ovs_db_v2.initialize()
         self._parse_network_vlan_ranges()
         ovs_db_v2.sync_vlan_allocations(self.network_vlan_ranges)
-        self.tenant_network_type = cfg.CONF.ovs.tenant_network_type
+        self.tenant_network_type = cfg.CONF.OVS.tenant_network_type
         if self.tenant_network_type not in [constants.TYPE_LOCAL,
                                             constants.TYPE_VLAN,
                                             constants.TYPE_GRE,
@@ -272,7 +272,7 @@ class OVSQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
                       "Agent terminated!"),
                       self.tenant_network_type)
             sys.exit(1)
-        self.enable_tunneling = cfg.CONF.ovs.enable_tunneling
+        self.enable_tunneling = cfg.CONF.OVS.enable_tunneling
         self.tunnel_id_ranges = []
         if self.enable_tunneling:
             self._parse_tunnel_id_ranges()
@@ -304,14 +304,14 @@ class OVSQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
     def _parse_network_vlan_ranges(self):
         try:
             self.network_vlan_ranges = plugin_utils.parse_network_vlan_ranges(
-                cfg.CONF.ovs.network_vlan_ranges)
+                cfg.CONF.OVS.network_vlan_ranges)
         except Exception as ex:
             LOG.error(_("%s. Agent terminated!"), ex)
             sys.exit(1)
         LOG.info(_("Network VLAN ranges: %s"), self.network_vlan_ranges)
 
     def _parse_tunnel_id_ranges(self):
-        for entry in cfg.CONF.ovs.tunnel_id_ranges:
+        for entry in cfg.CONF.OVS.tunnel_id_ranges:
             entry = entry.strip()
             try:
                 tun_min, tun_max = entry.split(':')
index 517b298fbe6aa5fe7dc305844e65d0fa1fa60671..7b5a5a43efb10160c6b2ab8eda85a27a2360bb7c 100755 (executable)
@@ -69,7 +69,7 @@ def _get_my_ip():
 def _get_ip(cfg_ip_str, cfg_interface_str):
     ip = None
     try:
-        ip = getattr(cfg.CONF.ovs, cfg_ip_str)
+        ip = getattr(cfg.CONF.OVS, cfg_ip_str)
     except (cfg.NoSuchOptError, cfg.NoSuchGroupError):
         pass
     if ip:
@@ -77,7 +77,7 @@ def _get_ip(cfg_ip_str, cfg_interface_str):
 
     iface = None
     try:
-        iface = getattr(cfg.CONF.ovs, cfg_interface_str)
+        iface = getattr(cfg.CONF.OVS, cfg_interface_str)
     except (cfg.NoSuchOptError, cfg.NoSuchGroupError):
         pass
     if iface:
@@ -278,13 +278,13 @@ def main():
 
     logging_config.setup_logging(cfg.CONF)
 
-    integ_br = cfg.CONF.ovs.integration_bridge
+    integ_br = cfg.CONF.OVS.integration_bridge
     polling_interval = cfg.CONF.AGENT.polling_interval
     root_helper = cfg.CONF.AGENT.root_helper
 
     tunnel_ip = _get_tunnel_ip()
     LOG.debug(_('tunnel_ip %s'), tunnel_ip)
-    ovsdb_port = cfg.CONF.ovs.ovsdb_port
+    ovsdb_port = cfg.CONF.OVS.ovsdb_port
     LOG.debug(_('ovsdb_port %s'), ovsdb_port)
     ovsdb_ip = _get_ovsdb_ip()
     LOG.debug(_('ovsdb_ip %s'), ovsdb_ip)
index e992e32a95c5240b3edbae8d4d5bb5980e9742c8..fec0ead4dbb6583d4ef5fed0fc65e4f2dac4a5b8 100644 (file)
@@ -47,6 +47,6 @@ agent_opts = [
 ]
 
 
-cfg.CONF.register_opts(ovs_opts, "ovs")
+cfg.CONF.register_opts(ovs_opts, "OVS")
 cfg.CONF.register_opts(agent_opts, "AGENT")
 config.register_root_helper(cfg.CONF)
index 3c2ac49689c430f2aaff65c9d9ba229b6b4b8a34..74468cfeba47d2941578c7a96468aa49a351390b 100644 (file)
@@ -101,8 +101,8 @@ class RyuQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
     def __init__(self, configfile=None):
         db.configure_db()
         self.tunnel_key = db_api_v2.TunnelKey(
-            cfg.CONF.ovs.tunnel_key_min, cfg.CONF.ovs.tunnel_key_max)
-        self.ofp_api_host = cfg.CONF.ovs.openflow_rest_api
+            cfg.CONF.OVS.tunnel_key_min, cfg.CONF.OVS.tunnel_key_max)
+        self.ofp_api_host = cfg.CONF.OVS.openflow_rest_api
         if not self.ofp_api_host:
             raise q_exc.Invalid(_('Invalid configuration. check ryu.ini'))
 
index 1b09b1ba6a5bc04ba164ca98d317f5bf440ac220..5896ec401fb93aabfe499525a01fdfcba0d5c785 100644 (file)
@@ -50,7 +50,7 @@ quota_opts = [
                help=_('Default driver to use for quota checks')),
 ]
 # Register the configuration options
-cfg.CONF.register_opts(quota_opts, 'quotas')
+cfg.CONF.register_opts(quota_opts, 'QUOTAS')
 
 
 class ConfDriver(object):
@@ -164,9 +164,9 @@ class BaseResource(object):
     @property
     def default(self):
         """Return the default value of the quota."""
-        return getattr(cfg.CONF.quotas,
+        return getattr(cfg.CONF.QUOTAS,
                        self.flag,
-                       cfg.CONF.quotas.default_quota)
+                       cfg.CONF.QUOTAS.default_quota)
 
 
 class CountableResource(BaseResource):
@@ -206,7 +206,7 @@ class QuotaEngine(object):
         """Initialize a Quota object."""
 
         if not quota_driver_class:
-            quota_driver_class = cfg.CONF.quotas.quota_driver
+            quota_driver_class = cfg.CONF.QUOTAS.quota_driver
 
         if isinstance(quota_driver_class, basestring):
             quota_driver_class = importutils.import_object(quota_driver_class)
@@ -306,7 +306,7 @@ def _count_resource(context, plugin, resources, tenant_id):
 
 def register_resources_from_config():
     resources = []
-    for resource_item in cfg.CONF.quotas.quota_items:
+    for resource_item in cfg.CONF.QUOTAS.quota_items:
         resources.append(CountableResource(resource_item, _count_resource,
                                            'quota_' + resource_item))
     QUOTAS.register_resources(resources)
index c6c0eb79dfa4d0e78d24c803a5fd08b11782a13b..cedeb3c2788e5dd188f95325106b8596365aa355 100644 (file)
@@ -25,7 +25,7 @@ lock_path = $state_path/lock
 [DATABASE]
 sql_connection = 'sqlite:///:memory:'
 
-[default_servicetype]
+[DEFAULT_SERVICETYPE]
 description = "default service type"
 service_definition=dummy:quantum.tests.unit.dummy_plugin.QuantumDummyPlugin
 
index e2396f57c89c240b6702b2332e57bb2a64ba9246..a2a239066fc2da121aa156cb8158855fc4390fa5 100644 (file)
@@ -98,7 +98,7 @@ class TestCiscoPortsV2(CiscoNetworkPluginV2TestCase,
 
         config = {
             ovs_config: {
-                'ovs': {'bridge_mappings': 'physnet1:br-eth1',
+                'OVS': {'bridge_mappings': 'physnet1:br-eth1',
                         'network_vlan_ranges': [range_str],
                         'tenant_network_type': 'vlan'}
             },
index bd5039405a384dab96a119ead57a3f277d02c5da..1a1905a35c4f6862b55afe6411891f4d4e6df4a8 100644 (file)
@@ -22,8 +22,7 @@ from quantum.tests import base
 class ConfigurationTest(base.BaseTestCase):
 
     def test_defaults(self):
-        self.assertEqual('br-int', config.CONF.ovs.integration_bridge)
-
+        self.assertEqual('br-int', config.CONF.OVS.integration_bridge)
         self.assertEqual(2, config.CONF.AGENT.polling_interval)
         self.assertEqual('sudo', config.CONF.AGENT.root_helper)
 
@@ -36,7 +35,7 @@ class ConfigurationTest(base.BaseTestCase):
         self.assertIsNone(config.CONF.OFC.cert_file)
 
     def test_shortcuts(self):
-        self.assertEqual(config.CONF.ovs.integration_bridge,
+        self.assertEqual(config.CONF.OVS.integration_bridge,
                          config.OVS.integration_bridge)
         self.assertEqual(config.CONF.AGENT.polling_interval,
                          config.AGENT.polling_interval)
index aa716338064f9dc59b779fa8cbb79a72c17cb784..98a4eba7196ee410f4027b051c6f4087ebe1d691 100644 (file)
@@ -25,7 +25,7 @@ lock_path = $state_path/lock
 [DATABASE]
 sql_connection = 'sqlite:///:memory:'
 
-[default_servicetype]
+[DEFAULT_SERVICETYPE]
 description = "default service type"
 service_definition=dummy:quantum.tests.unit.dummy_plugin.QuantumDummyPlugin
 
index 88dcbe89427fcc2c0344d0f9ab56ac4761ca2f56..27d996cf5fbfd3b8790b63537ec546acd6212efd 100644 (file)
@@ -22,12 +22,12 @@ from quantum.tests import base
 class ConfigurationTest(base.BaseTestCase):
 
     def test_defaults(self):
-        self.assertEqual('br-int', cfg.CONF.ovs.integration_bridge)
-        self.assertFalse(cfg.CONF.ovs.enable_tunneling)
-        self.assertEqual('br-tun', cfg.CONF.ovs.tunnel_bridge)
+        self.assertEqual('br-int', cfg.CONF.OVS.integration_bridge)
+        self.assertFalse(cfg.CONF.OVS.enable_tunneling)
+        self.assertEqual('br-tun', cfg.CONF.OVS.tunnel_bridge)
         self.assertEqual(2, cfg.CONF.AGENT.polling_interval)
         self.assertEqual('sudo', cfg.CONF.AGENT.root_helper)
-        self.assertEqual('local', cfg.CONF.ovs.tenant_network_type)
-        self.assertEqual(0, len(cfg.CONF.ovs.bridge_mappings))
-        self.assertEqual(0, len(cfg.CONF.ovs.network_vlan_ranges))
-        self.assertEqual(0, len(cfg.CONF.ovs.tunnel_id_ranges))
+        self.assertEqual('local', cfg.CONF.OVS.tenant_network_type)
+        self.assertEqual(0, len(cfg.CONF.OVS.bridge_mappings))
+        self.assertEqual(0, len(cfg.CONF.OVS.network_vlan_ranges))
+        self.assertEqual(0, len(cfg.CONF.OVS.tunnel_id_ranges))
index 9b7c14f3b5560ba122dccc601393360fc9ae128f..73bb935ee0204c719620ea4c70dd8101d6f4504f 100644 (file)
@@ -40,7 +40,7 @@ class CreateAgentConfigMap(base.BaseTestCase):
     def test_create_agent_config_map_fails_for_invalid_tunnel_config(self):
         self.addCleanup(cfg.CONF.reset)
         # An ip address is required for tunneling but there is no default
-        cfg.CONF.set_override('enable_tunneling', True, group='ovs')
+        cfg.CONF.set_override('enable_tunneling', True, group='OVS')
         with testtools.ExpectedException(ValueError):
             ovs_quantum_agent.create_agent_config_map(cfg.CONF)
 
index 10053710bee5f9c65b2dfd5cd22669055db0943a..2f0e02a52e5328e649bda7a57592ddffb327a844 100644 (file)
@@ -24,10 +24,10 @@ from quantum.tests import base
 class ConfigurationTest(base.BaseTestCase):
     """Configuration file Tests."""
     def test_defaults(self):
-        self.assertEqual('br-int', cfg.CONF.ovs.integration_bridge)
+        self.assertEqual('br-int', cfg.CONF.OVS.integration_bridge)
         self.assertEqual(2, cfg.CONF.AGENT.polling_interval)
         self.assertEqual('sudo', cfg.CONF.AGENT.root_helper)
-        self.assertEqual('127.0.0.1:8080', cfg.CONF.ovs.openflow_rest_api)
-        self.assertEqual(1, cfg.CONF.ovs.tunnel_key_min)
-        self.assertEqual(0xffffff, cfg.CONF.ovs.tunnel_key_max)
-        self.assertEqual(6634, cfg.CONF.ovs.ovsdb_port)
+        self.assertEqual('127.0.0.1:8080', cfg.CONF.OVS.openflow_rest_api)
+        self.assertEqual(1, cfg.CONF.OVS.tunnel_key_min)
+        self.assertEqual(0xffffff, cfg.CONF.OVS.tunnel_key_max)
+        self.assertEqual(6634, cfg.CONF.OVS.ovsdb_port)
index be7bfae907bade0addc3bed75ececfe596947349..9cc7d3538ae39b857508492d33192143906d0379 100644 (file)
@@ -494,7 +494,7 @@ class TestRyuQuantumAgent(RyuAgentTestCase):
         netifs_attrs = {'AF_INET': 0,
                         'ifaddresses.return_value': [[{'addr': '10.0.0.1'}]]}
         with nested(
-            mock.patch('oslo.config.cfg.CONF.ovs', **cfg_attrs),
+            mock.patch('oslo.config.cfg.CONF.OVS', **cfg_attrs),
             mock.patch(self._AGENT_NAME + '.netifaces', **netifs_attrs),
             mock.patch(self._AGENT_NAME + '._get_my_ip',
                        return_value='172.16.0.1')
@@ -511,7 +511,7 @@ class TestRyuQuantumAgent(RyuAgentTestCase):
         netifs_attrs = {'AF_INET': 0,
                         'ifaddresses.return_value': [[{'addr': '10.0.0.1'}]]}
         with nested(
-            mock.patch('oslo.config.cfg.CONF.ovs', **cfg_attrs),
+            mock.patch('oslo.config.cfg.CONF.OVS', **cfg_attrs),
             mock.patch(self._AGENT_NAME + '.netifaces', **netifs_attrs),
             mock.patch(self._AGENT_NAME + '._get_my_ip',
                        return_value='172.16.0.1')
@@ -530,7 +530,7 @@ class TestRyuQuantumAgent(RyuAgentTestCase):
         netifs_attrs = {'AF_INET': 0,
                         'ifaddresses.return_value': [[{'addr': '10.0.0.1'}]]}
         with nested(
-            mock.patch('oslo.config.cfg.CONF.ovs', **cfg_attrs),
+            mock.patch('oslo.config.cfg.CONF.OVS', **cfg_attrs),
             mock.patch(self._AGENT_NAME + '.netifaces', **netifs_attrs),
             mock.patch(self._AGENT_NAME + '._get_my_ip',
                        return_value='172.16.0.1')
@@ -564,8 +564,8 @@ class TestRyuQuantumAgent(RyuAgentTestCase):
         self.assertEqual(ip, '1.2.3.4')
 
     def mock_main(self):
-        cfg_attrs = {'ovs.integration_bridge': 'integ_br',
-                     'ovs.ovsdb_port': 16634,
+        cfg_attrs = {'OVS.integration_bridge': 'integ_br',
+                     'OVS.ovsdb_port': 16634,
                      'AGENT.root_helper': 'helper'}
         with nested(
             mock.patch('oslo.config.cfg.CONF', **cfg_attrs),
index 3398ba867c005ac68870950884b2d267c6aab166..b5c250317188af036715843ce3d74afb46e66358 100644 (file)
@@ -1299,7 +1299,7 @@ class NotificationTest(APIv2TestBase):
 
 class QuotaTest(APIv2TestBase):
     def test_create_network_quota(self):
-        cfg.CONF.set_override('quota_network', 1, group='quotas')
+        cfg.CONF.set_override('quota_network', 1, group='QUOTAS')
         initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid()}}
         full_input = {'network': {'admin_state_up': True, 'subnets': []}}
         full_input['network'].update(initial_input['network'])
@@ -1314,7 +1314,7 @@ class QuotaTest(APIv2TestBase):
                         res.json['QuantumError'])
 
     def test_create_network_quota_no_counts(self):
-        cfg.CONF.set_override('quota_network', 1, group='quotas')
+        cfg.CONF.set_override('quota_network', 1, group='QUOTAS')
         initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid()}}
         full_input = {'network': {'admin_state_up': True, 'subnets': []}}
         full_input['network'].update(initial_input['network'])
@@ -1331,7 +1331,7 @@ class QuotaTest(APIv2TestBase):
                         res.json['QuantumError'])
 
     def test_create_network_quota_without_limit(self):
-        cfg.CONF.set_override('quota_network', -1, group='quotas')
+        cfg.CONF.set_override('quota_network', -1, group='QUOTAS')
         initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid()}}
         instance = self.plugin.return_value
         instance.get_networks_count.return_value = 3
index 90d2260720371461e68dc5fc4487ab306494fcf3..2b7269a7c1d92e7719f9e544aa5ad6c8267a6719 100644 (file)
@@ -1949,7 +1949,7 @@ class TestNetworksV2(QuantumDbPluginV2TestCase):
         if self._skip_native_bulk:
             self.skipTest("Plugin does not support native bulk network create")
         quota = 4
-        cfg.CONF.set_override('quota_network', quota, group='quotas')
+        cfg.CONF.set_override('quota_network', quota, group='QUOTAS')
         res = self._create_network_bulk(self.fmt, quota + 1, 'test', True)
         self._validate_behavior_on_bulk_failure(res, 'networks', errcode=409)
 
@@ -1957,7 +1957,7 @@ class TestNetworksV2(QuantumDbPluginV2TestCase):
         if self._skip_native_bulk:
             self.skipTest("Plugin does not support native bulk network create")
         quota = 2
-        cfg.CONF.set_override('quota_network', quota, group='quotas')
+        cfg.CONF.set_override('quota_network', quota, group='QUOTAS')
         networks = [{'network': {'name': 'n1',
                                  'tenant_id': self._tenant_id}},
                     {'network': {'name': 'n2',
@@ -1974,7 +1974,7 @@ class TestNetworksV2(QuantumDbPluginV2TestCase):
         if self._skip_native_bulk:
             self.skipTest("Plugin does not support native bulk network create")
         quota = 2
-        cfg.CONF.set_override('quota_network', quota, group='quotas')
+        cfg.CONF.set_override('quota_network', quota, group='QUOTAS')
         networks = [{'network': {'name': 'n1',
                                  'tenant_id': self._tenant_id}},
                     {'network': {'name': 'n2',
index 488fea3a39ca37555123c70ca8b91b4a29c123b3..3b4315503f25e08ae221664a12f0a57bf9683619 100644 (file)
@@ -50,7 +50,7 @@ class QuotaExtensionTestCase(testlib_api.WebTestCase):
         cfg.CONF.set_override(
             'quota_items',
             ['network', 'subnet', 'port', 'extra1'],
-            group='quotas')
+            group='QUOTAS')
         quota.QUOTAS = quota.QuotaEngine()
         quota.register_resources_from_config()
         self._plugin_patcher = mock.patch(TARGET_PLUGIN, autospec=True)
@@ -85,7 +85,7 @@ class QuotaExtensionDbTestCase(QuotaExtensionTestCase):
         cfg.CONF.set_override(
             'quota_driver',
             'quantum.db.quota_db.DbQuotaDriver',
-            group='quotas')
+            group='QUOTAS')
         super(QuotaExtensionDbTestCase, self).setUp()
 
     def test_quotas_loaded_right(self):
index f4866d6564e8bfcb1c25b97c54e1d0d29d50d9bf..f7494ae282ba8b8b000f8a5df09307eb616d9636 100644 (file)
@@ -169,7 +169,7 @@ class RouterServiceInsertionTestCase(base.BaseTestCase):
         #just stubbing core plugin with LoadBalancer plugin
         cfg.CONF.set_override('core_plugin', plugin)
         cfg.CONF.set_override('service_plugins', [])
-        cfg.CONF.set_override('quota_router', -1, group='quotas')
+        cfg.CONF.set_override('quota_router', -1, group='QUOTAS')
         self.addCleanup(cfg.CONF.reset)
 
         # Ensure 'stale' patched copies of the plugin are never returned
index 2b6fd3a81b5533e49cbbf10d3ae45e6c57e404a5..670a544755a74a4d38a116d6694931fb77001e2b 100644 (file)
@@ -252,7 +252,7 @@ class ServiceTypeManagerTestCase(ServiceTypeTestCaseBase):
         servicetype_db.ServiceTypeManager._instance = None
         plugin_name = "%s.%s" % (dp.__name__, dp.DummyServicePlugin.__name__)
         cfg.CONF.set_override('service_definition', ['dummy:%s' % plugin_name],
-                              group='default_servicetype')
+                              group='DEFAULT_SERVICETYPE')
         self.addCleanup(db_api.clear_db)
         super(ServiceTypeManagerTestCase, self).setUp()
 
index 4d82fd089df28f13e997e6e53b4ceb5f00d747ad..6bd03e946e65375d3aaaf513a4df6edc3512458e 100644 (file)
@@ -18,7 +18,7 @@ sqlalchemy>=0.7.8,<=0.7.99
 WebOb>=1.2
 python-keystoneclient>=0.2.0
 alembic>=0.4.1
-http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config
+oslo.config>=1.1.0
 six
 
 # Cisco plugin dependencies