blob: 3225b0db90a4d6d0d1ac9abc1488dda6d655e2d3 [file] [log] [blame]
Ghanshyam2af64af2014-03-24 11:45:42 +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
15get_keypair = {
16 'status_code': [200],
17 'response_body': {
18 'type': 'object',
19 'properties': {
20 'keypair': {
21 'type': 'object',
22 'properties': {
23 'public_key': {'type': 'string'},
24 'name': {'type': 'string'},
25 'fingerprint': {'type': 'string'},
26 # NOTE: Now the type of 'user_id' is integer, but here
27 # allows 'string' also because we will be able to change
28 # it to 'uuid' in the future.
29 'user_id': {'type': ['integer', 'string']},
30 'deleted': {'type': 'boolean'},
31 'created_at': {'type': 'string'},
32 'updated_at': {'type': ['string', 'null']},
33 'deleted_at': {'type': ['string', 'null']},
34 'id': {'type': 'integer'}
35
36 },
37 # When we run the get keypair API, response body includes
38 # all the above mentioned attributes.
39 # But in Nova API sample file, response body includes only
40 # 'public_key', 'name' & 'fingerprint'. So only 'public_key',
41 # 'name' & 'fingerprint' are defined as 'required'.
42 'required': ['public_key', 'name', 'fingerprint']
43 }
44 },
45 'required': ['keypair']
46 }
47}