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 | |
Yuiko Takada | 3657ae8 | 2014-03-25 09:52:15 +0000 | [diff] [blame^] | 15 | import copy |
| 16 | |
| 17 | from tempest.api_schema.compute import quotas |
| 18 | |
| 19 | quota_set = copy.deepcopy(quotas.common_quota_set) |
| 20 | quota_set['response_body']['properties']['quota_set']['properties'][ |
| 21 | 'id'] = {'type': 'string'} |
| 22 | quota_set['response_body']['properties']['quota_set']['properties'][ |
| 23 | 'injected_files'] = {'type': 'integer'} |
| 24 | quota_set['response_body']['properties']['quota_set']['properties'][ |
| 25 | 'injected_file_content_bytes'] = {'type': 'integer'} |
| 26 | quota_set['response_body']['properties']['quota_set']['properties'][ |
| 27 | 'injected_file_path_bytes'] = {'type': 'integer'} |
| 28 | quota_set['response_body']['properties']['quota_set']['required'].extend([ |
| 29 | 'id', |
| 30 | 'injected_files', |
| 31 | 'injected_file_content_bytes', |
| 32 | 'injected_file_path_bytes']) |
| 33 | |
| 34 | quota_set_update = copy.deepcopy(quotas.common_quota_set) |
| 35 | quota_set_update['response_body']['properties']['quota_set']['properties'][ |
| 36 | 'injected_files'] = {'type': 'integer'} |
| 37 | quota_set_update['response_body']['properties']['quota_set']['properties'][ |
| 38 | 'injected_file_content_bytes'] = {'type': 'integer'} |
| 39 | quota_set_update['response_body']['properties']['quota_set']['properties'][ |
| 40 | 'injected_file_path_bytes'] = {'type': 'integer'} |
| 41 | quota_set_update['response_body']['properties']['quota_set'][ |
| 42 | 'required'].extend(['injected_files', |
| 43 | 'injected_file_content_bytes', |
| 44 | 'injected_file_path_bytes']) |
Yuiko Takada | a3d584d | 2014-04-03 14:11:53 +0000 | [diff] [blame] | 45 | |
| 46 | delete_quota = { |
| 47 | 'status_code': [202] |
| 48 | } |