From 842521cb1267413025c47248dae8cd622d1d104c Mon Sep 17 00:00:00 2001 From: sathish-nagappan Date: Fri, 30 Nov 2012 14:53:21 -0800 Subject: [PATCH] Rename Config osapi_compute_link_prefix to osapi_volume_base_URL fixes Bug #1046451 Renamed the config option. Change-Id: Ia6eb057a11828bdc216e0bddbd29855285ba938c --- cinder/api/common.py | 6 +++--- cinder/flags.py | 5 +++-- etc/cinder/cinder.conf.sample | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cinder/api/common.py b/cinder/api/common.py index 53b1c87f2..f04d9fbe3 100644 --- a/cinder/api/common.py +++ b/cinder/api/common.py @@ -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, diff --git a/cinder/flags.py b/cinder/flags.py index 10476d78f..93ce443ee 100644 --- a/cinder/flags.py +++ b/cinder/flags.py @@ -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 ' diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 053d0b457..2f87758c2 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -101,9 +101,9 @@ # osapi_volume_extension=cinder.api.openstack.volume.contrib.standard_extensions #### (MultiStrOpt) osapi volume extension to load -# osapi_compute_link_prefix= +# osapi_volume_base_URL= #### (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 -- 2.45.2