]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Register used CONF entries in cinder.api.common.py
authorJohn Griffith <john.griffith@solidfire.com>
Mon, 24 Jun 2013 23:38:38 +0000 (17:38 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Tue, 25 Jun 2013 14:28:12 +0000 (08:28 -0600)
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

cinder/api/common.py

index 0a076ac467e6975291778808483a734a46f35bfa..f3429f9415eaf09933561246a795c85540afe533 100644 (file)
@@ -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__)