Merge "Fix unused constants"

This commit is contained in:
Zuul
2025-12-25 18:13:47 +00:00
committed by Gerrit Code Review
4 changed files with 9 additions and 19 deletions

View File

@@ -13,20 +13,24 @@
from oslo_config import cfg
from zaqar.common import consts
transport = cfg.StrOpt(
'transport', default='wsgi',
'transport',
default=consts.TRANSPORT_WSGI,
choices=(consts.TRANSPORT_WSGI, consts.TRANSPORT_WEBSOCKET),
help='Transport driver to use.')
message_store = cfg.StrOpt(
'message_store', default='mongodb',
'message_store', default=consts.MSG_STORE_MONGODB,
deprecated_opts=[cfg.DeprecatedOpt('storage')],
help='Storage driver to use as the messaging store.')
management_store = cfg.StrOpt(
'management_store', default='mongodb',
'management_store', default=consts.MGMT_STORE_MONGODB,
help='Storage driver to use as the management store.')

View File

@@ -1,10 +0,0 @@
[DEFAULT]
debug = False
verbose = False
[drivers]
transport = invalid
message_store = sqlalchemy
[drivers:transport:wsgi]
port = 8888

View File

@@ -39,11 +39,6 @@ class TestBootstrap(base.TestBase):
bootstrap = self._bootstrap('wsgi_mongodb_pooled.conf')
self.assertIsInstance(bootstrap.storage._storage, pooling.DataDriver)
def test_transport_invalid(self):
bootstrap = self._bootstrap('drivers_transport_invalid.conf')
self.assertRaises(errors.InvalidDriver,
lambda: bootstrap.transport)
def test_transport_wsgi(self):
bootstrap = self._bootstrap('wsgi_mongodb.conf')
self.assertIsInstance(bootstrap.transport, wsgi.Driver)

View File

@@ -34,6 +34,7 @@ from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from zaqar import bootstrap
from zaqar.common import consts
from zaqar import version
# Use the global CONF instance
@@ -49,7 +50,7 @@ def init_application():
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
boot = bootstrap.Bootstrap(CONF)
CONF.drivers.transport = 'wsgi'
CONF.drivers.transport = consts.TRANSPORT_WSGI
return boot.transport.app