Merge "Remove deprecated volume apis from v2 volumes client"
This commit is contained in:
commit
bf832eb8d0
|
@ -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.
|
|
@ -13,7 +13,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from debtcollector import removals
|
|
||||||
from oslo_serialization import jsonutils as json
|
from oslo_serialization import jsonutils as json
|
||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse as urllib
|
from six.moves.urllib import parse as urllib
|
||||||
|
@ -340,34 +339,6 @@ class VolumesClient(base_client.BaseClient):
|
||||||
self.expected_success(200, resp.status)
|
self.expected_success(200, resp.status)
|
||||||
return rest_client.ResponseBody(resp, body)
|
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):
|
def unmanage_volume(self, volume_id):
|
||||||
"""Unmanage volume.
|
"""Unmanage volume.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue