blob: 86efadfae62a661f01273a00ff92095843293ed4 [file] [log] [blame]
Haiwei Xu03a0e9d2014-03-28 02:22:50 +09001# 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
Haiwei Xu11e69da2014-03-28 04:00:45 +090015import copy
16
Ken'ichi Ohmichi0b31d302014-05-01 10:53:25 +090017from tempest.api_schema.compute import hosts
18
Haiwei Xu03a0e9d2014-03-28 02:22:50 +090019
20startup_host = {
21 'status_code': [200],
Ken'ichi Ohmichi0b31d302014-05-01 10:53:25 +090022 'response_body': hosts.common_start_up_body
Haiwei Xu03a0e9d2014-03-28 02:22:50 +090023}
Haiwei Xu11e69da2014-03-28 04:00:45 +090024
25# The 'power_action' attribute of 'shutdown_host' API is 'shutdown'
26shutdown_host = copy.deepcopy(startup_host)
27
28shutdown_host['response_body']['properties']['power_action'] = {
29 'enum': ['shutdown']
30}
31
32# The 'power_action' attribute of 'reboot_host' API is 'reboot'
33reboot_host = copy.deepcopy(startup_host)
34
35reboot_host['response_body']['properties']['power_action'] = {
36 'enum': ['reboot']
37}
Ghanshyamf0bc57f2014-04-28 11:30:33 +090038
39update_host = {
40 'status_code': [200],
41 'response_body': hosts.update_host_common
42}