Yuiko Takada | 26c3b17 | 2014-03-19 14:03:28 +0000 | [diff] [blame] | 1 | # Copyright 2014 NEC Corporation. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
| 15 | quota_set = { |
| 16 | 'status_code': [200], |
| 17 | 'response_body': { |
| 18 | 'type': 'object', |
| 19 | 'properties': { |
| 20 | 'quota_set': { |
| 21 | 'type': 'object', |
| 22 | 'properties': { |
| 23 | 'id': {'type': 'string'}, |
| 24 | 'instances': {'type': 'integer'}, |
| 25 | 'cores': {'type': 'integer'}, |
| 26 | 'ram': {'type': 'integer'}, |
| 27 | 'floating_ips': {'type': 'integer'}, |
| 28 | 'fixed_ips': {'type': 'integer'}, |
| 29 | 'metadata_items': {'type': 'integer'}, |
| 30 | 'key_pairs': {'type': 'integer'}, |
| 31 | 'security_groups': {'type': 'integer'}, |
| 32 | 'security_group_rules': {'type': 'integer'} |
| 33 | }, |
| 34 | 'required': ['id', 'instances', 'cores', 'ram', |
| 35 | 'floating_ips', 'fixed_ips', |
| 36 | 'metadata_items', 'key_pairs', |
| 37 | 'security_groups', 'security_group_rules'] |
| 38 | } |
| 39 | }, |
| 40 | 'required': ['quota_set'] |
| 41 | } |
| 42 | } |
Yuiko Takada | 2f6c17e | 2014-03-20 13:21:05 +0000 | [diff] [blame] | 43 | |
| 44 | quota_common_info = { |
| 45 | 'type': 'object', |
| 46 | 'properties': { |
| 47 | 'reserved': {'type': 'integer'}, |
| 48 | 'limit': {'type': 'integer'}, |
| 49 | 'in_use': {'type': 'integer'} |
| 50 | }, |
| 51 | 'required': ['reserved', 'limit', 'in_use'] |
| 52 | } |
| 53 | |
| 54 | quota_set_detail = { |
| 55 | 'status_code': [200], |
| 56 | 'response_body': { |
| 57 | 'type': 'object', |
| 58 | 'properties': { |
| 59 | 'quota_set': { |
| 60 | 'type': 'object', |
| 61 | 'properties': { |
| 62 | 'id': {'type': 'string'}, |
| 63 | 'instances': quota_common_info, |
| 64 | 'cores': quota_common_info, |
| 65 | 'ram': quota_common_info, |
| 66 | 'floating_ips': quota_common_info, |
| 67 | 'fixed_ips': quota_common_info, |
| 68 | 'metadata_items': quota_common_info, |
| 69 | 'key_pairs': quota_common_info, |
| 70 | 'security_groups': quota_common_info, |
| 71 | 'security_group_rules': quota_common_info |
| 72 | }, |
| 73 | 'required': ['id', 'instances', 'cores', 'ram', |
| 74 | 'floating_ips', 'fixed_ips', |
| 75 | 'metadata_items', 'key_pairs', |
| 76 | 'security_groups', 'security_group_rules'] |
| 77 | } |
| 78 | }, |
| 79 | 'required': ['quota_set'] |
| 80 | } |
| 81 | } |
Yuiko Takada | a3d584d | 2014-04-03 14:11:53 +0000 | [diff] [blame] | 82 | |
| 83 | delete_quota = { |
| 84 | 'status_code': [204] |
| 85 | } |