diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-03-30 21:01:50 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-03-30 21:01:50 +0000 |
commit | 01e3a3fc626bbeb6de19369856ff85e31bbb83d9 (patch) | |
tree | 48441eb6c6489df2c1258d871806c630a912d1e6 /tempest/api_schema/response | |
parent | b1a0db99ca20a2ecbfbe69c9c926b192994bebb6 (diff) | |
parent | 5a28c3b37086ff5b2dd83e3b7b28958810c17d4a (diff) | |
download | tempest-01e3a3fc626bbeb6de19369856ff85e31bbb83d9.tar.gz |
Merge "Merge availability_zone response schema into one file"
Diffstat (limited to 'tempest/api_schema/response')
-rw-r--r-- | tempest/api_schema/response/compute/availability_zone.py | 37 | ||||
-rw-r--r-- | tempest/api_schema/response/compute/v2_1/availability_zone.py | 32 |
2 files changed, 26 insertions, 43 deletions
diff --git a/tempest/api_schema/response/compute/availability_zone.py b/tempest/api_schema/response/compute/availability_zone.py deleted file mode 100644 index ab3e2ea4e..000000000 --- a/tempest/api_schema/response/compute/availability_zone.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2014 NEC Corporation. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# NOTE: This is the detail information for "get az detail" API. -# The information is the same between v2 and v3 APIs. -detail = { - 'type': 'object', - 'patternProperties': { - # NOTE: Here is for a hostname - '^[a-zA-Z0-9-_.]+$': { - 'type': 'object', - 'patternProperties': { - # NOTE: Here is for a service name - '^.*$': { - 'type': 'object', - 'properties': { - 'available': {'type': 'boolean'}, - 'active': {'type': 'boolean'}, - 'updated_at': {'type': ['string', 'null']} - }, - 'required': ['available', 'active', 'updated_at'] - } - } - } - } -} diff --git a/tempest/api_schema/response/compute/v2_1/availability_zone.py b/tempest/api_schema/response/compute/v2_1/availability_zone.py index e261d3d6c..5c1224e2f 100644 --- a/tempest/api_schema/response/compute/v2_1/availability_zone.py +++ b/tempest/api_schema/response/compute/v2_1/availability_zone.py @@ -14,8 +14,6 @@ import copy -from tempest.api_schema.response.compute import availability_zone as common - base = { 'status_code': [200], @@ -47,8 +45,30 @@ base = { } } -get_availability_zone_list = copy.deepcopy(base) +detail = { + 'type': 'object', + 'patternProperties': { + # NOTE: Here is for a hostname + '^[a-zA-Z0-9-_.]+$': { + 'type': 'object', + 'patternProperties': { + # NOTE: Here is for a service name + '^.*$': { + 'type': 'object', + 'properties': { + 'available': {'type': 'boolean'}, + 'active': {'type': 'boolean'}, + 'updated_at': {'type': ['string', 'null']} + }, + 'required': ['available', 'active', 'updated_at'] + } + } + } + } +} + +list_availability_zone_list = copy.deepcopy(base) -get_availability_zone_list_detail = copy.deepcopy(base) -get_availability_zone_list_detail['response_body']['properties'][ - 'availabilityZoneInfo']['items']['properties']['hosts'] = common.detail +list_availability_zone_list_detail = copy.deepcopy(base) +list_availability_zone_list_detail['response_body']['properties'][ + 'availabilityZoneInfo']['items']['properties']['hosts'] = detail |