From: John Griffith Date: Mon, 24 Jun 2013 23:38:38 +0000 (-0600) Subject: Register used CONF entries in cinder.api.common.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=aac4b8569af05ecfe45d41d89b84b957e9e400ff;p=openstack-build%2Fcinder-build.git Register used CONF entries in cinder.api.common.py After change: I2114d5fc45f5299c3b2011270034a3370e0ec388 we were no longer registering defaults for cinder.api.common.py settings. The result is that you're unable to run individual unit tests like cinder.tests.api.test_volume_metadata.py. Register the needed CONF options and we're all set again. Fixes bug: 1194315 Change-Id: I6df6c5ec5687c8156a9f3794cc7f04d8d28065d9 --- diff --git a/cinder/api/common.py b/cinder/api/common.py index 0a076ac46..f3429f941 100644 --- a/cinder/api/common.py +++ b/cinder/api/common.py @@ -29,7 +29,21 @@ from cinder.openstack.common import log as logging from cinder 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_volume_base_URL', + default=None, + help='Base URL that will be presented to users in links ' + 'to the OpenStack Volume API', + deprecated_name='osapi_compute_link_prefix'), +] + CONF = cfg.CONF +CONF.register_opts(api_common_opts) + LOG = logging.getLogger(__name__)