Remove unnecessary class variable in v3 snapshots_client

The class variable 'create_resp' in v3 snapshots_client is not unnecessary,
and it can be substituted by constant string 202.

Change-Id: I983465f34b4130d4db39e2be82d33d54aec0d537
This commit is contained in:
jeremy.zhang 2018-08-24 17:49:58 +08:00
parent b53b923818
commit b0f65f6ae7

View File

@ -22,7 +22,6 @@ from tempest.lib import exceptions as lib_exc
class SnapshotsClient(rest_client.RestClient):
"""Client class to send CRUD Volume Snapshot V3 API requests."""
create_resp = 202
def list_snapshots(self, detail=False, **params):
"""List all the snapshot.
@ -66,7 +65,7 @@ class SnapshotsClient(rest_client.RestClient):
post_body = json.dumps({'snapshot': kwargs})
resp, body = self.post('snapshots', post_body)
body = json.loads(body)
self.expected_success(self.create_resp, resp.status)
self.expected_success(202, resp.status)
return rest_client.ResponseBody(resp, body)
def update_snapshot(self, snapshot_id, **kwargs):