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
This commit is contained in:
parent
b17cc68730
commit
7fb9c39efe
@ -43,7 +43,7 @@ list_services = {
|
||||
}
|
||||
}
|
||||
|
||||
enable_service = {
|
||||
enable_disable_service = {
|
||||
'status_code': [200],
|
||||
'response_body': {
|
||||
'type': 'object',
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user