From d5e40672689ae67aabf92737ff91ad3410c98a23 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 22 Jan 2016 11:49:56 -0800 Subject: Change attach_id to volume_id in show_volume_attachment The id in the os-volume_attachments GET request is actually the volume id [1] so rename the variable so people like me aren't super confused when writing code with tempest-lib. [1] http://tinyurl.com/hl2mcwb Change-Id: Ie5454963ce931a7238e34737b638e171c69d0125 --- tempest_lib/services/compute/servers_client.py | 4 ++-- tempest_lib/tests/services/compute/test_servers_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tempest_lib/services/compute/servers_client.py b/tempest_lib/services/compute/servers_client.py index 62c3900..5bbcf24 100644 --- a/tempest_lib/services/compute/servers_client.py +++ b/tempest_lib/services/compute/servers_client.py @@ -319,10 +319,10 @@ class ServersClient(rest_client.RestClient): self.validate_response(schema.detach_volume, resp, body) return rest_client.ResponseBody(resp, body) - def show_volume_attachment(self, server_id, attach_id): + def show_volume_attachment(self, server_id, volume_id): """Return details about the given volume attachment.""" resp, body = self.get('servers/%s/os-volume_attachments/%s' % ( - server_id, attach_id)) + server_id, volume_id)) body = json.loads(body) self.validate_response(schema.show_volume_attachment, resp, body) return rest_client.ResponseBody(resp, body) diff --git a/tempest_lib/tests/services/compute/test_servers_client.py b/tempest_lib/tests/services/compute/test_servers_client.py index 90026c3..44cd7ce 100644 --- a/tempest_lib/tests/services/compute/test_servers_client.py +++ b/tempest_lib/tests/services/compute/test_servers_client.py @@ -592,7 +592,7 @@ class TestServersClient(base.BaseComputeServiceTest): 'tempest_lib.common.rest_client.RestClient.get', {'volumeAttachment': self.FAKE_COMMON_VOLUME}, server_id=self.server_id, - attach_id='fake-attach-id' + volume_id=self.FAKE_COMMON_VOLUME['volumeId'] ) def test_list_volume_attachments_with_str_body(self): -- cgit v1.2.1