Remove deprecated volume apis from v2 volumes client

The APIs 'show_pools' and 'show_backend_capabilities' in v2
volumes_client are deprecated, and they are re-realized in volume
v2 scheduler_stats_client and capabilities_client. Now these two
deprecated APIs are not being used by any other projects, and it is
time to remove them from the v2 volumes_client.

Change-Id: Iaed636bffe912e424dbccb20c38946525af052db
This commit is contained in:
jeremy.zhang 2017-10-31 10:51:00 +08:00
parent 1235b81b9c
commit 710c8422fe
2 changed files with 7 additions and 29 deletions

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Remove deprecated APIs (``show_pools`` and ``show_backend_capabilities``)
from volume v2 volumes_client, and the deprecated APIs are re-realized in
volume v2 scheduler_stats_client (``list_pools``) and capabilities_client
(``show_backend_capabilities``) accordingly.

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from debtcollector import removals
from oslo_serialization import jsonutils as json
import six
from six.moves.urllib import parse as urllib
@ -340,34 +339,6 @@ class VolumesClient(base_client.BaseClient):
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
@removals.remove(message="use list_pools from tempest.lib.services."
"volume.v2.scheduler_stats_client")
def show_pools(self, detail=False):
# List all the volumes pools (hosts)
url = 'scheduler-stats/get_pools'
if detail:
url += '?detail=True'
resp, body = self.get(url)
body = json.loads(body)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
@removals.remove(message="use show_backend_capabilities from tempest.lib."
"services.volume.v2.capabilities_client")
def show_backend_capabilities(self, host):
"""Shows capabilities for a storage back end.
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#show-back-end-capabilities
"""
url = 'capabilities/%s' % host
resp, body = self.get(url)
body = json.loads(body)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
def unmanage_volume(self, volume_id):
"""Unmanage volume.