From 7fb9c39efe3d5e3ea73f6ecbb53a1c1ba908edad Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Fri, 18 Sep 2015 09:51:17 +0900 Subject: [PATCH] Add json schema for disable service There is missing compute response schema for disable service. This commit adds json response schema for desable service API. Change-Id: Icd49783f19be4c30df9532e85b0cccf3410ad8fb --- tempest/api_schema/response/compute/v2_1/services.py | 2 +- tempest/services/compute/json/services_client.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tempest/api_schema/response/compute/v2_1/services.py b/tempest/api_schema/response/compute/v2_1/services.py index c2c7a51b78..ddef7b2291 100644 --- a/tempest/api_schema/response/compute/v2_1/services.py +++ b/tempest/api_schema/response/compute/v2_1/services.py @@ -43,7 +43,7 @@ list_services = { } } -enable_service = { +enable_disable_service = { 'status_code': [200], 'response_body': { 'type': 'object', diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py index 232b301d38..f82a18fa3b 100644 --- a/tempest/services/compute/json/services_client.py +++ b/tempest/services/compute/json/services_client.py @@ -42,7 +42,7 @@ class ServicesClient(service_client.ServiceClient): post_body = json.dumps({'binary': binary, 'host': host_name}) resp, body = self.put('os-services/enable', post_body) body = json.loads(body) - self.validate_response(schema.enable_service, resp, body) + self.validate_response(schema.enable_disable_service, resp, body) return service_client.ResponseBody(resp, body) def disable_service(self, host_name, binary): @@ -54,4 +54,5 @@ class ServicesClient(service_client.ServiceClient): post_body = json.dumps({'binary': binary, 'host': host_name}) resp, body = self.put('os-services/disable', post_body) body = json.loads(body) + self.validate_response(schema.enable_disable_service, resp, body) return service_client.ResponseBody(resp, body)