diff --git a/etc/marconi-proxy.conf-sample b/etc/marconi-proxy.conf-sample index 25725bcda..03929797c 100644 --- a/etc/marconi-proxy.conf-sample +++ b/etc/marconi-proxy.conf-sample @@ -26,18 +26,18 @@ log_file = /var/log/marconi/proxy.log # Transport driver module (e.g., wsgi, zmq) # Storage driver module (e.g., mongodb, sqlite) -[proxy:drivers] +[drivers] transport = wsgi storage = mongodb -[proxy:drivers:transport:wsgi] +[drivers:transport:wsgi] ;bind = 0.0.0.0 ;port = 8889 -[proxy:drivers:storage:mongodb] +[drivers:storage:mongodb] uri = mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test&ssl=true&w=majority database = marconi_proxy [oslo_cache] ;cache_backend = memcached -;cache_prefix = my_namespace \ No newline at end of file +;cache_prefix = my_namespace diff --git a/etc/marconi-queues.conf-sample b/etc/marconi-queues.conf-sample index 41c092153..4620b1d15 100644 --- a/etc/marconi-queues.conf-sample +++ b/etc/marconi-queues.conf-sample @@ -31,7 +31,7 @@ log_file = /var/log/marconi/queues.log # ================= Driver Options ============================ -[queues:drivers] +[drivers] # Transport driver module (e.g., wsgi, zmq) transport = wsgi @@ -47,7 +47,7 @@ storage = mongodb # Pipeline for operations on claim resources ;claim_pipeline = -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] ;bind = 0.0.0.0 ;port = 8888 @@ -56,10 +56,10 @@ storage = mongodb ;metadata_max_length = 65536 ;content_max_length = 262144 -;[queues:drivers:transport:zmq] +;[drivers:transport:zmq] ;port = 9999 -[queues:drivers:storage:mongodb] +[drivers:storage:mongodb] uri = mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test&ssl=true&w=majority database = marconi @@ -83,7 +83,7 @@ database = marconi # at the same instant. ;max_retry_jitter = 0.005 -[queues:limits:transport] +[limits:transport] # The maximum number of queue records per page when listing queues ;queue_paging_uplimit = 20 @@ -102,7 +102,7 @@ database = marconi ;metadata_size_uplimit = 65536 ;message_size_uplimit = 262144 -[queues:limits:storage] +[limits:storage] # The default number of queue records per page when listing queues ;default_queue_paging = 10 diff --git a/marconi/proxy/base.py b/marconi/proxy/base.py index 01345d7e3..8626893eb 100644 --- a/marconi/proxy/base.py +++ b/marconi/proxy/base.py @@ -32,7 +32,7 @@ _bootstrap_options = [ ] CFG = cfg.CONF -CFG.register_opts(_bootstrap_options, group="proxy:drivers") +CFG.register_opts(_bootstrap_options, group="drivers") LOG = log.getLogger(__name__) @@ -63,7 +63,7 @@ class Bootstrap(object): LOG.debug(_(u'Loading Proxy Storage Driver')) try: mgr = driver.DriverManager('marconi.proxy.storage', - CFG['proxy:drivers'].storage, + CFG['drivers'].storage, invoke_on_load=True) return mgr.driver except RuntimeError as exc: @@ -85,7 +85,7 @@ class Bootstrap(object): LOG.debug(_(u'Loading Proxy Transport Driver')) try: mgr = driver.DriverManager(self._transport_type, - CFG['proxy:drivers'].transport, + CFG['drivers'].transport, invoke_on_load=True, invoke_args=[self.storage, self.cache]) diff --git a/marconi/proxy/storage/mongodb/options.py b/marconi/proxy/storage/mongodb/options.py index 45234eda4..b1b6a6641 100644 --- a/marconi/proxy/storage/mongodb/options.py +++ b/marconi/proxy/storage/mongodb/options.py @@ -27,6 +27,6 @@ _MONGODB_OPTIONS = [ cfg.StrOpt('database', default='marconi_proxy', help='Database name'), ] -_GROUP = 'proxy:drivers:storage:mongodb' +_GROUP = 'drivers:storage:mongodb' cfg.CONF.register_opts(_MONGODB_OPTIONS, group=_GROUP) CFG = cfg.CONF[_GROUP] diff --git a/marconi/proxy/transport/wsgi/driver.py b/marconi/proxy/transport/wsgi/driver.py index 4b2399dd1..9248bd831 100644 --- a/marconi/proxy/transport/wsgi/driver.py +++ b/marconi/proxy/transport/wsgi/driver.py @@ -41,10 +41,10 @@ _WSGI_OPTIONS = [ cfg.CONF.register_opt(cfg.StrOpt('auth_strategy', default='')) cfg.CONF.register_opts(_WSGI_OPTIONS, - group='proxy:drivers:transport:wsgi') + group='drivers:transport:wsgi') GLOBAL_CFG = cfg.CONF -WSGI_CFG = cfg.CONF['proxy:drivers:transport:wsgi'] +WSGI_CFG = cfg.CONF['drivers:transport:wsgi'] LOG = logging.getLogger(__name__) diff --git a/marconi/queues/bootstrap.py b/marconi/queues/bootstrap.py index 5dfdd1340..56d4acf04 100644 --- a/marconi/queues/bootstrap.py +++ b/marconi/queues/bootstrap.py @@ -44,7 +44,7 @@ _DRIVER_OPTIONS = [ help='Storage driver to use'), ] -_DRIVER_GROUP = 'queues:drivers' +_DRIVER_GROUP = 'drivers' class Bootstrap(object): diff --git a/marconi/queues/storage/base.py b/marconi/queues/storage/base.py index d2bfaeb31..7fccc69da 100644 --- a/marconi/queues/storage/base.py +++ b/marconi/queues/storage/base.py @@ -28,7 +28,7 @@ _LIMITS_OPTIONS = [ help='Default message pagination size') ] -_LIMITS_GROUP = 'queues:limits:storage' +_LIMITS_GROUP = 'limits:storage' @six.add_metaclass(abc.ABCMeta) diff --git a/marconi/queues/storage/mongodb/options.py b/marconi/queues/storage/mongodb/options.py index 3a3c85acf..38ecb2ab0 100644 --- a/marconi/queues/storage/mongodb/options.py +++ b/marconi/queues/storage/mongodb/options.py @@ -53,4 +53,4 @@ MONGODB_OPTIONS = [ 'same instant.')), ] -MONGODB_GROUP = 'queues:drivers:storage:mongodb' +MONGODB_GROUP = 'drivers:storage:mongodb' diff --git a/marconi/queues/storage/sharding.py b/marconi/queues/storage/sharding.py index bb574cd20..eb90ad35f 100644 --- a/marconi/queues/storage/sharding.py +++ b/marconi/queues/storage/sharding.py @@ -29,7 +29,7 @@ _CATALOG_OPTIONS = [ help='Catalog storage driver'), ] -_CATALOG_GROUP = 'queues:sharding:catalog' +_CATALOG_GROUP = 'sharding:catalog' class DataDriver(storage.DataDriverBase): @@ -299,23 +299,23 @@ class Catalog(object): general_dict_opts = {'dynamic': True} general_opts = common_utils.dict_to_conf(general_dict_opts) - # NOTE(cpp-cabrera): parse general opts: 'queues:drivers' + # NOTE(cpp-cabrera): parse general opts: 'drivers' uri = shard['uri'] storage_type = six.moves.urllib_parse.urlparse(uri).scheme driver_dict_opts = {'storage': storage_type} driver_opts = common_utils.dict_to_conf(driver_dict_opts) # NOTE(cpp-cabrera): parse storage-specific opts: - # 'queues:drivers:storage:{type}' + # 'drivers:storage:{type}' storage_dict_opts = shard['options'] storage_dict_opts['uri'] = shard['uri'] storage_opts = common_utils.dict_to_conf(storage_dict_opts) - storage_group = u'queues:drivers:storage:%s' % storage_type + storage_group = u'drivers:storage:%s' % storage_type # NOTE(cpp-cabrera): register those options! conf = cfg.ConfigOpts() conf.register_opts(general_opts) - conf.register_opts(driver_opts, group=u'queues:drivers') + conf.register_opts(driver_opts, group=u'drivers') conf.register_opts(storage_opts, group=storage_group) return utils.load_storage_driver(conf) diff --git a/marconi/queues/storage/sqlite/driver.py b/marconi/queues/storage/sqlite/driver.py index 1bcc28ad8..27d0018c8 100644 --- a/marconi/queues/storage/sqlite/driver.py +++ b/marconi/queues/storage/sqlite/driver.py @@ -31,7 +31,7 @@ _SQLITE_OPTIONS = [ help='Sqlite database to use.') ] -_SQLITE_GROUP = 'queues:drivers:storage:sqlite' +_SQLITE_GROUP = 'drivers:storage:sqlite' class DataDriver(storage.DataDriverBase): diff --git a/marconi/queues/storage/utils.py b/marconi/queues/storage/utils.py index 985c9cf51..298d9820b 100644 --- a/marconi/queues/storage/utils.py +++ b/marconi/queues/storage/utils.py @@ -28,14 +28,14 @@ def load_storage_driver(conf, control_mode=False): The driver's initializer will be passed conf as its only arg. :param conf: Configuration instance to use for loading the - driver. Must include a 'queues:drivers' group. + driver. Must include a 'drivers' group. """ mode = 'control' if control_mode else 'data' driver_type = 'marconi.queues.{0}.storage'.format(mode) try: mgr = driver.DriverManager(driver_type, - conf['queues:drivers'].storage, + conf['drivers'].storage, invoke_on_load=True, invoke_args=[conf]) return mgr.driver diff --git a/marconi/queues/transport/validation.py b/marconi/queues/transport/validation.py index 0cf4167e2..57e3d1b00 100644 --- a/marconi/queues/transport/validation.py +++ b/marconi/queues/transport/validation.py @@ -29,7 +29,7 @@ _TRANSPORT_LIMITS_OPTIONS = [ cfg.IntOpt('claim_grace_max', default=43200), ] -_TRANSPORT_LIMITS_GROUP = 'queues:limits:transport' +_TRANSPORT_LIMITS_GROUP = 'limits:transport' # NOTE(kgriffs): Don't use \w because it isn't guaranteed to match # only ASCII characters. diff --git a/marconi/queues/transport/wsgi/driver.py b/marconi/queues/transport/wsgi/driver.py index b1973c8d7..e453a956b 100644 --- a/marconi/queues/transport/wsgi/driver.py +++ b/marconi/queues/transport/wsgi/driver.py @@ -39,7 +39,7 @@ _WSGI_OPTIONS = [ cfg.IntOpt('metadata_max_length', default=64 * 1024) ] -_WSGI_GROUP = 'queues:drivers:transport:wsgi' +_WSGI_GROUP = 'drivers:transport:wsgi' LOG = logging.getLogger(__name__) diff --git a/tests/etc/drivers_storage_invalid.conf b/tests/etc/drivers_storage_invalid.conf index 9a0ecd11e..a29dd121b 100644 --- a/tests/etc/drivers_storage_invalid.conf +++ b/tests/etc/drivers_storage_invalid.conf @@ -3,9 +3,9 @@ debug = False verbose = False admin_mode = False -[queues:drivers] +[drivers] transport = wsgi storage = invalid -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 diff --git a/tests/etc/drivers_transport_invalid.conf b/tests/etc/drivers_transport_invalid.conf index 66066911f..8c280aa39 100644 --- a/tests/etc/drivers_transport_invalid.conf +++ b/tests/etc/drivers_transport_invalid.conf @@ -2,9 +2,9 @@ debug = False verbose = False -[queues:drivers] +[drivers] transport = invalid storage = sqlite -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 diff --git a/tests/etc/functional-marconi.conf b/tests/etc/functional-marconi.conf index 8ab7918a9..d4f7a4ff7 100644 --- a/tests/etc/functional-marconi.conf +++ b/tests/etc/functional-marconi.conf @@ -20,13 +20,13 @@ debug = True ;syslog_log_facility = LOG_LOCAL0 -[queues:drivers] +[drivers] # Transport driver module (e.g., wsgi, zmq) transport = wsgi # Storage driver module (e.g., mongodb, sqlite) storage = sqlite -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] bind = 127.0.0.1 port = 8888 @@ -35,10 +35,10 @@ port = 8888 ;metadata_max_length = 65536 ;content_max_length = 262144 -;[queues:drivers:transport:zmq] +;[drivers:transport:zmq] ;port = 9999 -[queues:limits:transport] +[limits:transport] # The maximum number of queue records per page when listing queues ;queue_paging_uplimit = 20 # The maximum number of messages in a message posting, maximum diff --git a/tests/etc/keystone_auth.conf b/tests/etc/keystone_auth.conf index e9c2770f3..896c81529 100644 --- a/tests/etc/keystone_auth.conf +++ b/tests/etc/keystone_auth.conf @@ -4,10 +4,10 @@ auth_strategy = keystone debug = False verbose = False -[queues:drivers] +[drivers] transport = wsgi storage = sqlite -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] bind = 0.0.0.0:8888 workers = 20 diff --git a/tests/etc/wsgi_faulty.conf b/tests/etc/wsgi_faulty.conf index 90cd941ec..35ff5c829 100644 --- a/tests/etc/wsgi_faulty.conf +++ b/tests/etc/wsgi_faulty.conf @@ -2,9 +2,9 @@ debug = False verbose = False -[queues:drivers] +[drivers] transport = wsgi storage = faulty -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 diff --git a/tests/etc/wsgi_mongodb.conf b/tests/etc/wsgi_mongodb.conf index 8b348b658..b09aeb7eb 100644 --- a/tests/etc/wsgi_mongodb.conf +++ b/tests/etc/wsgi_mongodb.conf @@ -2,13 +2,13 @@ debug = False verbose = False -[queues:drivers] +[drivers] transport = wsgi storage = mongodb -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 -[queues:drivers:storage:mongodb] +[drivers:storage:mongodb] uri = mongodb://127.0.0.1:27017 database = marconi_test diff --git a/tests/etc/wsgi_mongodb_sharded.conf b/tests/etc/wsgi_mongodb_sharded.conf index bc6937d15..f3c172582 100644 --- a/tests/etc/wsgi_mongodb_sharded.conf +++ b/tests/etc/wsgi_mongodb_sharded.conf @@ -1,10 +1,10 @@ [DEFAULT] sharding = True -[queues:drivers] +[drivers] transport = wsgi storage = mongodb -[queues:drivers:storage:mongodb] +[drivers:storage:mongodb] uri = mongodb://127.0.0.1:27017 database = marconi_test diff --git a/tests/etc/wsgi_proxy_memory.conf b/tests/etc/wsgi_proxy_memory.conf index 2c179f315..d38199d4a 100644 --- a/tests/etc/wsgi_proxy_memory.conf +++ b/tests/etc/wsgi_proxy_memory.conf @@ -2,9 +2,9 @@ debug = False verbose = False -[proxy:drivers] +[drivers] transport = wsgi storage = memory -[proxy:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 diff --git a/tests/etc/wsgi_proxy_mongodb.conf b/tests/etc/wsgi_proxy_mongodb.conf index 37bc87779..877eeda91 100644 --- a/tests/etc/wsgi_proxy_mongodb.conf +++ b/tests/etc/wsgi_proxy_mongodb.conf @@ -2,13 +2,13 @@ debug = False verbose = False -[proxy:drivers] +[drivers] transport = wsgi storage = mongodb -[proxy:drivers:transport:wsgi] +[drivers:transport:wsgi] port = 8888 -[proxy:drivers:storage:mongodb] +[drivers:storage:mongodb] uri = mongodb://127.0.0.1:27017 database = marconi_proxy_test diff --git a/tests/etc/wsgi_sqlite.conf b/tests/etc/wsgi_sqlite.conf index e5dfe37b5..d26b0db19 100644 --- a/tests/etc/wsgi_sqlite.conf +++ b/tests/etc/wsgi_sqlite.conf @@ -3,11 +3,11 @@ debug = False verbose = False admin_mode = False -[queues:drivers] +[drivers] transport = wsgi storage = sqlite -[queues:drivers:transport:wsgi] +[drivers:transport:wsgi] bind = 0.0.0.0 port = 8888 workers = 20 diff --git a/tests/etc/wsgi_sqlite_default_limits.conf b/tests/etc/wsgi_sqlite_default_limits.conf index 41950f86b..b0e6d65a2 100644 --- a/tests/etc/wsgi_sqlite_default_limits.conf +++ b/tests/etc/wsgi_sqlite_default_limits.conf @@ -1,7 +1,7 @@ -[queues:drivers] +[drivers] transport = wsgi storage = sqlite -[queues:limits:storage] +[limits:storage] default_queue_paging = 1 default_message_paging = 2 diff --git a/tests/etc/wsgi_sqlite_sharded.conf b/tests/etc/wsgi_sqlite_sharded.conf index 7941d21a5..aad1fca27 100644 --- a/tests/etc/wsgi_sqlite_sharded.conf +++ b/tests/etc/wsgi_sqlite_sharded.conf @@ -1,6 +1,6 @@ [DEFAULT] sharding = True -[queues:drivers] +[drivers] transport = wsgi storage = sqlite diff --git a/tests/etc/wsgi_sqlite_validation.conf b/tests/etc/wsgi_sqlite_validation.conf index ed38a3fac..967620184 100644 --- a/tests/etc/wsgi_sqlite_validation.conf +++ b/tests/etc/wsgi_sqlite_validation.conf @@ -1,7 +1,7 @@ -[queues:drivers] +[drivers] transport = wsgi storage = sqlite -[queues:limits:transport] +[limits:transport] metadata_size_uplimit = 64 message_size_uplimit = 256 diff --git a/tests/unit/queues/storage/test_shard_catalog.py b/tests/unit/queues/storage/test_shard_catalog.py index eed16a177..f66daba13 100644 --- a/tests/unit/queues/storage/test_shard_catalog.py +++ b/tests/unit/queues/storage/test_shard_catalog.py @@ -36,7 +36,7 @@ class TestShardCatalog(testing.TestBase): super(TestShardCatalog, self).setUp() self.conf.register_opts([cfg.StrOpt('storage')], - group='queues:drivers') + group='drivers') control = utils.load_storage_driver(self.conf, control_mode=True) self.catalogue_ctrl = control.catalogue_controller self.shards_ctrl = control.shards_controller diff --git a/tests/unit/queues/transport/wsgi/test_messages.py b/tests/unit/queues/transport/wsgi/test_messages.py index d499aa2ec..5e977cb86 100644 --- a/tests/unit/queues/transport/wsgi/test_messages.py +++ b/tests/unit/queues/transport/wsgi/test_messages.py @@ -35,7 +35,7 @@ class MessagesBaseTest(base.TestBase): if self.conf.sharding: for i in range(4): - uri = self.conf['queues:drivers:storage:mongodb'].uri + uri = self.conf['drivers:storage:mongodb'].uri doc = {'weight': 100, 'uri': uri} self.simulate_put('/v1/shards/' + str(i), body=json.dumps(doc))