Ghanshyam | 7fa397c | 2014-04-01 19:32:38 +0900 | [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 | |
Ghanshyam | a8f6653 | 2014-04-23 17:18:14 +0900 | [diff] [blame] | 15 | import copy |
| 16 | |
Ghanshyam | 7fa397c | 2014-04-01 19:32:38 +0900 | [diff] [blame] | 17 | get_password = { |
| 18 | 'status_code': [200], |
| 19 | 'response_body': { |
| 20 | 'type': 'object', |
| 21 | 'properties': { |
| 22 | 'password': {'type': 'string'} |
| 23 | }, |
| 24 | 'required': ['password'] |
| 25 | } |
| 26 | } |
Ghanshyam | d6d3040 | 2014-04-02 15:28:37 +0900 | [diff] [blame] | 27 | |
| 28 | get_vnc_console = { |
| 29 | 'status_code': [200], |
| 30 | 'response_body': { |
| 31 | 'type': 'object', |
| 32 | 'properties': { |
| 33 | 'console': { |
| 34 | 'type': 'object', |
| 35 | 'properties': { |
| 36 | 'type': {'type': 'string'}, |
| 37 | 'url': { |
| 38 | 'type': 'string', |
| 39 | 'format': 'uri' |
| 40 | } |
| 41 | }, |
| 42 | 'required': ['type', 'url'] |
| 43 | } |
| 44 | }, |
| 45 | 'required': ['console'] |
| 46 | } |
| 47 | } |
Ghanshyam | 4ac0274 | 2014-04-17 19:15:47 +0900 | [diff] [blame] | 48 | |
| 49 | delete_server = { |
| 50 | 'status_code': [204], |
| 51 | } |
Haiwei Xu | 3d2b7af | 2014-04-12 02:50:26 +0900 | [diff] [blame] | 52 | |
| 53 | set_server_metadata = { |
| 54 | 'status_code': [200], |
| 55 | 'response_body': { |
| 56 | 'type': 'object', |
| 57 | 'properties': { |
Ghanshyam | eaaa6a4 | 2014-04-25 18:38:21 +0900 | [diff] [blame] | 58 | 'metadata': { |
| 59 | 'type': 'object', |
| 60 | 'patternProperties': { |
| 61 | '^.+$': {'type': 'string'} |
| 62 | } |
| 63 | } |
Haiwei Xu | 3d2b7af | 2014-04-12 02:50:26 +0900 | [diff] [blame] | 64 | }, |
| 65 | 'required': ['metadata'] |
| 66 | } |
| 67 | } |
Ghanshyam | a8f6653 | 2014-04-23 17:18:14 +0900 | [diff] [blame] | 68 | |
| 69 | list_server_metadata = copy.deepcopy(set_server_metadata) |
Ghanshyam | eaaa6a4 | 2014-04-25 18:38:21 +0900 | [diff] [blame] | 70 | |
| 71 | delete_server_metadata_item = { |
| 72 | 'status_code': [204] |
| 73 | } |