Move definition of couple of config opts to proper module
Define config options 'osapi_max_limit' and 'osapi_share_base_URL' in proper module to be able to run module "manila.api.common" without import of module "manila.common.config". Without it all unit test modules that import "manila.api.common" fail due to not defined mentioned config opts. Change-Id: I725ab6cc7d777b3384bdd9095c72ecd65079e6cf Closes-Bug: #1194315
This commit is contained in:
parent
00184fbf54
commit
d3cfecca83
|
@ -27,7 +27,19 @@ from manila.api import xmlutil
|
|||
from manila.i18n import _
|
||||
from manila import utils
|
||||
|
||||
api_common_opts = [
|
||||
cfg.IntOpt(
|
||||
'osapi_max_limit',
|
||||
default=1000,
|
||||
help='The maximum number of items returned in a single response from '
|
||||
'a collection resource.'),
|
||||
cfg.StrOpt(
|
||||
'osapi_share_base_URL',
|
||||
help='Base URL to be presented to users in links to the Share API'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(api_common_opts)
|
||||
LOG = log.getLogger(__name__)
|
||||
XML_NS_V1 = 'http://docs.openstack.org/volume/api/v1'
|
||||
|
||||
|
|
|
@ -95,15 +95,6 @@ global_opts = [
|
|||
cfg.MultiStrOpt('osapi_share_extension',
|
||||
default=['manila.api.contrib.standard_extensions'],
|
||||
help='The osapi share extension to load.'),
|
||||
cfg.StrOpt('osapi_share_base_URL',
|
||||
default=None,
|
||||
help='Base URL that will be presented to users in links '
|
||||
'to the OpenStack Share API.',
|
||||
deprecated_name='osapi_compute_link_prefix'),
|
||||
cfg.IntOpt('osapi_max_limit',
|
||||
default=1000,
|
||||
help='The maximum number of items returned in a single '
|
||||
'response from a collection resource.'),
|
||||
cfg.StrOpt('sqlite_db',
|
||||
default='manila.sqlite',
|
||||
help='The filename to use with sqlite.'),
|
||||
|
|
|
@ -22,6 +22,7 @@ import itertools
|
|||
import oslo_concurrency.opts
|
||||
import oslo_log._options
|
||||
|
||||
import manila.api.common
|
||||
import manila.api.middleware.auth
|
||||
import manila.api.middleware.sizelimit
|
||||
import manila.common.config
|
||||
|
@ -71,6 +72,7 @@ import manila.wsgi
|
|||
# Any new option list or option needs to be registered here.
|
||||
_global_opt_lists = [
|
||||
# Keep list alphabetically sorted
|
||||
manila.api.common.api_common_opts,
|
||||
[manila.api.middleware.auth.use_forwarded_for_opt],
|
||||
[manila.api.middleware.sizelimit.max_request_body_size_opt],
|
||||
manila.common.config.core_opts,
|
||||
|
|
Loading…
Reference in New Issue