From c67fc2da7a0648eb302b6ef02ae92fcd48201414 Mon Sep 17 00:00:00 2001 From: Yulia Portnova <yportnova@mirantis.com> Date: Thu, 5 Sep 2013 11:02:21 +0300 Subject: [PATCH] osapi_volume to osapi_share --- manila/api/common.py | 6 +++--- manila/api/contrib/__init__.py | 2 +- manila/api/extensions.py | 6 +++--- manila/flags.py | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manila/api/common.py b/manila/api/common.py index 704e5ed811..3e9d0fdbc8 100644 --- a/manila/api/common.py +++ b/manila/api/common.py @@ -192,7 +192,7 @@ class ViewBuilder(object): params = request.params.copy() params["marker"] = identifier prefix = self._update_link_prefix(request.application_url, - FLAGS.osapi_volume_base_URL) + FLAGS.osapi_share_base_URL) url = os.path.join(prefix, request.environ["manila.context"].project_id, self._collection_name) @@ -201,7 +201,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_volume_base_URL) + FLAGS.osapi_share_base_URL) return os.path.join(prefix, request.environ["manila.context"].project_id, self._collection_name, @@ -211,7 +211,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_volume_base_URL) + FLAGS.osapi_share_base_URL) return os.path.join(base_url, request.environ["manila.context"].project_id, self._collection_name, diff --git a/manila/api/contrib/__init__.py b/manila/api/contrib/__init__.py index 4b20970532..735a53fdb2 100644 --- a/manila/api/contrib/__init__.py +++ b/manila/api/contrib/__init__.py @@ -36,4 +36,4 @@ def standard_extensions(ext_mgr): def select_extensions(ext_mgr): extensions.load_standard_extensions(ext_mgr, LOG, __path__, __package__, - FLAGS.osapi_volume_ext_list) + FLAGS.osapi_share_ext_list) diff --git a/manila/api/extensions.py b/manila/api/extensions.py index cd3cbca545..1a756d2e65 100644 --- a/manila/api/extensions.py +++ b/manila/api/extensions.py @@ -183,7 +183,7 @@ class ExtensionManager(object): def __init__(self): LOG.audit(_('Initializing extension manager.')) - self.cls_list = FLAGS.osapi_volume_extension + self.cls_list = FLAGS.osapi_share_extension self.extensions = {} self._load_extensions() @@ -275,10 +275,10 @@ class ExtensionManager(object): 'standard_extensions') new_contrib_path = 'manila.api.contrib.standard_extensions' if old_contrib_path in extensions: - LOG.warn(_('osapi_volume_extension is set to deprecated path: %s'), + LOG.warn(_('osapi_share_extension is set to deprecated path: %s'), old_contrib_path) LOG.warn(_('Please set your flag or manila.conf settings for ' - 'osapi_volume_extension to: %s'), new_contrib_path) + 'osapi_share_extension to: %s'), new_contrib_path) extensions = [e.replace(old_contrib_path, new_contrib_path) for e in extensions] diff --git a/manila/flags.py b/manila/flags.py index 1680a9602e..6b23180a70 100644 --- a/manila/flags.py +++ b/manila/flags.py @@ -146,15 +146,15 @@ global_opts = [ cfg.BoolOpt('api_rate_limit', default=True, help='whether to rate limit the api'), - cfg.ListOpt('osapi_volume_ext_list', + cfg.ListOpt('osapi_share_ext_list', default=[], help='Specify list of extensions to load when using osapi_' 'volume_extension option with manila.api.contrib.' 'select_extensions'), - cfg.MultiStrOpt('osapi_volume_extension', + cfg.MultiStrOpt('osapi_share_extension', default=['manila.api.contrib.standard_extensions'], help='osapi volume extension to load'), - cfg.StrOpt('osapi_volume_base_URL', + cfg.StrOpt('osapi_share_base_URL', default=None, help='Base URL that will be presented to users in links ' 'to the OpenStack Volume API',