From 9594233ffd93066677aa601c594d55f3a4f188d8 Mon Sep 17 00:00:00 2001 From: "jeremy.zhang" Date: Thu, 21 Jun 2018 12:54:33 +0800 Subject: [PATCH] Fix some typos on the types and encryption types client This patch just fix some typos on the volume types and encryption types client. Change-Id: I5f89200b914c6653d7215966756550fa8722362a --- .../volume/v1/encryption_types_client.py | 4 +-- .../volume/v3/encryption_types_client.py | 2 +- .../lib/services/volume/v3/types_client.py | 28 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tempest/lib/services/volume/v1/encryption_types_client.py b/tempest/lib/services/volume/v1/encryption_types_client.py index 0fac6bd7ba..1fde79f80c 100644 --- a/tempest/lib/services/volume/v1/encryption_types_client.py +++ b/tempest/lib/services/volume/v1/encryption_types_client.py @@ -38,7 +38,7 @@ class EncryptionTypesClient(rest_client.RestClient): def show_encryption_type(self, volume_type_id): """Get the volume encryption type for the specified volume type. - volume_type_id: Id of volume_type. + :param volume_type_id: Id of volume type. """ url = "/types/%s/encryption" % volume_type_id resp, body = self.get(url) @@ -61,7 +61,7 @@ class EncryptionTypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def delete_encryption_type(self, volume_type_id): - """Delete the encryption type for the specified volume-type.""" + """Delete the encryption type for the specified volume type.""" resp, body = self.delete( "/types/%s/encryption/provider" % volume_type_id) self.expected_success(202, resp.status) diff --git a/tempest/lib/services/volume/v3/encryption_types_client.py b/tempest/lib/services/volume/v3/encryption_types_client.py index 7443a873dc..03de187885 100644 --- a/tempest/lib/services/volume/v3/encryption_types_client.py +++ b/tempest/lib/services/volume/v3/encryption_types_client.py @@ -38,7 +38,7 @@ class EncryptionTypesClient(rest_client.RestClient): def show_encryption_type(self, volume_type_id): """Get the volume encryption type for the specified volume type. - volume_type_id: Id of volume_type. + :param volume_type_id: Id of volume type. """ url = "/types/%s/encryption" % volume_type_id resp, body = self.get(url) diff --git a/tempest/lib/services/volume/v3/types_client.py b/tempest/lib/services/volume/v3/types_client.py index aac91297f8..13ecd15414 100644 --- a/tempest/lib/services/volume/v3/types_client.py +++ b/tempest/lib/services/volume/v3/types_client.py @@ -21,7 +21,7 @@ from tempest.lib import exceptions as lib_exc class TypesClient(rest_client.RestClient): - """Client class to send CRUD Volume API requests""" + """Client class to send CRUD Volume Types API requests""" def is_resource_deleted(self, id): try: @@ -36,7 +36,7 @@ class TypesClient(rest_client.RestClient): return 'volume-type' def list_volume_types(self, **params): - """List all the volume_types created. + """List all the volume types created. For a full list of available parameters, please refer to the official API reference: @@ -52,7 +52,7 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def show_volume_type(self, volume_type_id): - """Returns the details of a single volume_type. + """Returns the details of a single volume type. For a full list of available parameters, please refer to the official API reference: @@ -78,7 +78,7 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def delete_volume_type(self, volume_type_id): - """Deletes the Specified Volume_type. + """Deletes the specified volume type. For a full list of available parameters, please refer to the official API reference: @@ -89,7 +89,7 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def list_volume_types_extra_specs(self, volume_type_id, **params): - """List all the volume_types extra specs created. + """List all the volume type extra specs created. For a full list of available parameters, please refer to the official API reference: @@ -105,7 +105,7 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def show_volume_type_extra_specs(self, volume_type_id, extra_specs_name): - """Returns the details of a single volume_type extra spec.""" + """Returns the details of a single volume type extra spec.""" url = "types/%s/extra_specs/%s" % (volume_type_id, extra_specs_name) resp, body = self.get(url) body = json.loads(body) @@ -113,10 +113,10 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def create_volume_type_extra_specs(self, volume_type_id, extra_specs): - """Creates a new Volume_type extra spec. + """Creates new volume type extra specs. - volume_type_id: Id of volume_type. - extra_specs: A dictionary of values to be used as extra_specs. + :param volume_type_id: Id of volume type. + :param extra_specs: A dictionary of values to be used as extra_specs. """ url = "types/%s/extra_specs" % volume_type_id post_body = json.dumps({'extra_specs': extra_specs}) @@ -126,7 +126,7 @@ class TypesClient(rest_client.RestClient): return rest_client.ResponseBody(resp, body) def delete_volume_type_extra_specs(self, volume_type_id, extra_spec_name): - """Deletes the Specified Volume_type extra spec.""" + """Deletes the specified volume type extra spec.""" resp, body = self.delete("types/%s/extra_specs/%s" % ( volume_type_id, extra_spec_name)) self.expected_success(202, resp.status) @@ -149,10 +149,10 @@ class TypesClient(rest_client.RestClient): extra_specs): """Update a volume_type extra spec. - volume_type_id: Id of volume_type. - extra_spec_name: Name of the extra spec to be updated. - extra_spec: A dictionary of with key as extra_spec_name and the - updated value. + :param volume_type_id: Id of volume type. + :param extra_spec_name: Name of the extra spec to be updated. + :param extra_specs: A dictionary of with key as extra_spec_name and the + updated value. For a full list of available parameters, please refer to the official API reference: https://developer.openstack.org/api-ref/block-storage/v3/index.html#update-extra-specification-for-volume-type