blob: 82506e775e352a7c4b6b98646e36ddcad6a23282 [file] [log] [blame]
YuikoTakadaac0879a2015-01-22 02:40:03 +00001# Copyright 2015 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
ghanshyam44ec0be2015-03-17 14:17:45 +090015import copy
16
YuikoTakadaac0879a2015-01-22 02:40:03 +000017node = {
18 'type': 'object',
19 'properties': {
20 'id': {'type': 'string'},
21 'interfaces': {'type': 'array'},
22 'host': {'type': 'string'},
23 'task_state': {'type': ['string', 'null']},
Adam Gandelmanf8eb01a2015-02-16 14:30:43 -080024 'cpus': {'type': ['integer', 'string']},
25 'memory_mb': {'type': ['integer', 'string']},
26 'disk_gb': {'type': ['integer', 'string']},
YuikoTakadaac0879a2015-01-22 02:40:03 +000027 },
28 'required': ['id', 'interfaces', 'host', 'task_state', 'cpus', 'memory_mb',
29 'disk_gb']
30}
31
32list_baremetal_nodes = {
33 'status_code': [200],
34 'response_body': {
35 'type': 'object',
36 'properties': {
37 'nodes': {
38 'type': 'array',
39 'items': node
40 }
41 },
42 'required': ['nodes']
43 }
44}
45
ghanshyam44ec0be2015-03-17 14:17:45 +090046baremetal_node = {
YuikoTakadaac0879a2015-01-22 02:40:03 +000047 'status_code': [200],
48 'response_body': {
49 'type': 'object',
50 'properties': {
51 'node': node
52 },
53 'required': ['node']
54 }
55}
ghanshyam44ec0be2015-03-17 14:17:45 +090056get_baremetal_node = copy.deepcopy(baremetal_node)
57get_baremetal_node['response_body']['properties']['node'][
58 'properties'].update({'instance_uuid': {'type': ['string', 'null']}})
59get_baremetal_node['response_body']['properties']['node'][
60 'required'].append('instance_uuid')