]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Rename Config osapi_compute_link_prefix to osapi_volume_base_URL
authorsathish-nagappan <sathish.nagappan@nebula.com>
Fri, 30 Nov 2012 22:53:21 +0000 (14:53 -0800)
committersathish-nagappan <sathish.nagappan@nebula.com>
Fri, 30 Nov 2012 22:55:33 +0000 (14:55 -0800)
fixes Bug #1046451

Renamed the config option.

Change-Id: Ia6eb057a11828bdc216e0bddbd29855285ba938c

cinder/api/common.py
cinder/flags.py
etc/cinder/cinder.conf.sample

index 53b1c87f2711eff5bbc04ed6ed1f31ca8a3a3cca..f04d9fbe3f24c727bf0e5a0e2efce20977c2f5d4 100644 (file)
@@ -191,7 +191,7 @@ class ViewBuilder(object):
         params = request.params.copy()
         params["marker"] = identifier
         prefix = self._update_link_prefix(request.application_url,
-                                          FLAGS.osapi_compute_link_prefix)
+                                          FLAGS.osapi_volume_base_URL)
         url = os.path.join(prefix,
                            request.environ["cinder.context"].project_id,
                            self._collection_name)
@@ -200,7 +200,7 @@ class ViewBuilder(object):
     def _get_href_link(self, request, identifier):
         """Return an href string pointing to this object."""
         prefix = self._update_link_prefix(request.application_url,
-                                          FLAGS.osapi_compute_link_prefix)
+                                          FLAGS.osapi_volume_base_URL)
         return os.path.join(prefix,
                             request.environ["cinder.context"].project_id,
                             self._collection_name,
@@ -210,7 +210,7 @@ class ViewBuilder(object):
         """Create a URL that refers to a specific resource."""
         base_url = remove_version_from_href(request.application_url)
         base_url = self._update_link_prefix(base_url,
-                                            FLAGS.osapi_compute_link_prefix)
+                                            FLAGS.osapi_volume_base_URL)
         return os.path.join(base_url,
                             request.environ["cinder.context"].project_id,
                             self._collection_name,
index 10476d78fa04ecfd3ecd6ad508b2c2220b4da0cd..93ce443ee55d5c0d594124296e5668749609b914 100644 (file)
@@ -151,10 +151,11 @@ global_opts = [
                         'cinder.api.contrib.standard_extensions',
                     ],
                     help='osapi volume extension to load'),
-    cfg.StrOpt('osapi_compute_link_prefix',
+    cfg.StrOpt('osapi_volume_base_URL',
                default=None,
                help='Base URL that will be presented to users in links '
-                    'to the OpenStack Compute API'),
+                    'to the OpenStack Volume API',
+               deprecated_name='osapi_compute_link_prefix'),
     cfg.IntOpt('osapi_max_limit',
                default=1000,
                help='the maximum number of items returned in a single '
index 053d0b4576a9c1046bda979ca2a89051b18b2af5..2f87758c2342ad352788ff8fdb7cb48681a11674 100644 (file)
 # osapi_volume_extension=cinder.api.openstack.volume.contrib.standard_extensions
 #### (MultiStrOpt) osapi volume extension to load
 
-# osapi_compute_link_prefix=<None>
+# osapi_volume_base_URL=<None>
 #### (StrOpt) Base URL that will be presented to users in links to the
-####          OpenStack Compute API
+####          OpenStack Volume API
 
 # osapi_max_limit=1000
 #### (IntOpt) the maximum number of items returned in a single response