blob: b64b4a5c4c885d34a901f4335bc7aca5d0b06221 [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
dwallecke62b9f02012-10-10 23:34:42 -05002# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Matthew Treinish21905512015-07-13 10:33:35 -040016from oslo_serialization import jsonutils as json
Matthew Treinish684d8992014-01-30 16:27:40 +000017
ghanshyamaa93b4b2015-03-20 11:03:44 +090018from tempest.api_schema.response.compute.v2_1 import limits as schema
Ken'ichi Ohmichi4771cbc2015-01-19 23:45:23 +000019from tempest.common import service_client
dwallecke62b9f02012-10-10 23:34:42 -050020
21
Ken'ichi Ohmichia6287072015-07-02 02:43:15 +000022class LimitsClient(service_client.ServiceClient):
dwallecke62b9f02012-10-10 23:34:42 -050023
Ken'ichi Ohmichi354338d2015-06-11 05:28:42 +000024 def show_limits(self):
dwallecke62b9f02012-10-10 23:34:42 -050025 resp, body = self.get("limits")
26 body = json.loads(body)
Masayuki Igawa435fa492014-03-18 12:00:54 +090027 self.validate_response(schema.get_limit, resp, body)
ghanshyam8a599492015-08-24 15:55:59 +090028 return service_client.ResponseBody(resp, body)