api-ref: Fix keypair API parameters

Fix parameter types and the order of parameters.
Add missing parameters.
Add a period at the end of a parameter description.
Replace sample files with v2.10 files.

Change-Id: I9d8d20b42c7d32e11af479e79c9c9e8475421302
Closes-Bug: #1656781
This commit is contained in:
Takashi NATSUME 2017-01-16 18:42:21 +09:00
parent 4cd8ab5bdc
commit 2800b53836
2 changed files with 48 additions and 23 deletions

View File

@ -32,6 +32,7 @@ Response
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- keypairs: keypairs - keypairs: keypairs
- keypair: keypair
- name: keypair_name - name: keypair_name
- public_key: keypair_public_key - public_key: keypair_public_key
- fingerprint: keypair_fingerprint - fingerprint: keypair_fingerprint
@ -69,9 +70,9 @@ Request
- type: keypair_type_in - type: keypair_type_in
- user_id: keypair_userid_in - user_id: keypair_userid_in
**Example Create Or Import Keypair: JSON request** **Example Create Or Import Keypair (v2.10): JSON request**
.. literalinclude:: ../../doc/api_samples/keypairs/keypairs-import-post-req.json .. literalinclude:: ../../doc/api_samples/keypairs/v2.10/keypairs-import-post-req.json
:language: javascript :language: javascript
Response Response
@ -82,14 +83,14 @@ Response
- keypair: keypair - keypair: keypair
- name: keypair_name - name: keypair_name
- public_key: keypair_public_key - public_key: keypair_public_key
- private_key: keypair_private_key
- fingerprint: keypair_fingerprint - fingerprint: keypair_fingerprint
- type: keypair_type
- user_id: keypair_userid - user_id: keypair_userid
- private_key: keypair_private_key
- type: keypair_type
**Example Create Or Import Keypair: JSON response** **Example Create Or Import Keypair (v2.10): JSON response**
.. literalinclude:: ../../doc/api_samples/keypairs/keypairs-import-post-resp.json .. literalinclude:: ../../doc/api_samples/keypairs/v2.10/keypairs-import-post-resp.json
:language: javascript :language: javascript
Show Keypair Details Show Keypair Details
@ -109,7 +110,7 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- keypair_name: keypair_name_path - keypair_name: keypair_name_path
- user_id: keypair_userid_in - user_id: keypair_user
Response Response
-------- --------
@ -117,15 +118,20 @@ Response
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- keypair: keypair - keypair: keypair
- created_at: created
- deleted: keypair_deleted
- deleted_at: keypair_updated_deleted_at
- fingerprint: keypair_fingerprint
- id: keypair_id
- name: keypair_name - name: keypair_name
- public_key: keypair_public_key - public_key: keypair_public_key
- fingerprint: keypair_fingerprint - updated_at: keypair_updated_deleted_at
- type: keypair_type
- user_id: keypair_userid - user_id: keypair_userid
- type: keypair_type
**Example Show Keypair Details: JSON response** **Example Show Keypair Details (v2.10): JSON response**
.. literalinclude:: ../../doc/api_samples/keypairs/keypairs-get-resp.json .. literalinclude:: ../../doc/api_samples/keypairs/v2.10/keypairs-get-resp.json
:language: javascript :language: javascript
Delete Keypair Delete Keypair
@ -149,8 +155,8 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- keypair_name: keypair_name - keypair_name: keypair_name_path
- user_id: keypair_userid_in - user_id: keypair_user
Response Response
-------- --------

View File

@ -504,19 +504,12 @@ keypair_marker:
required: false required: false
type: string type: string
min_version: 2.35 min_version: 2.35
keypair_type_in:
in: query
required: false
type: string
description: |
The type of the keypair. Allowed values are ``ssh`` or ``x509``
min_version: 2.2
keypair_user: keypair_user:
in: query in: query
required: false required: false
type: string type: string
description: | description: |
This allows administrative users to list key-pairs of specified This allows administrative users to operate key-pairs of specified
user ID. user ID.
min_version: 2.10 min_version: 2.10
limit: limit:
@ -1459,7 +1452,7 @@ delete_on_termination:
type: string type: string
deleted: deleted:
description: | description: |
A boolean indicate whether this aggregate is deleted or not, if it has A boolean indicates whether this aggregate is deleted or not, if it has
not been deleted, ``false`` will appear. not been deleted, ``false`` will appear.
in: body in: body
required: true required: true
@ -2766,12 +2759,25 @@ keypair:
required: true required: true
description: | description: |
Keypair object Keypair object
keypair_deleted:
description: |
A boolean indicates whether this keypair is deleted or not.
The value is always ``false`` (not deleted).
in: body
required: true
type: boolean
keypair_fingerprint: keypair_fingerprint:
in: body in: body
required: true required: true
type: string type: string
description: | description: |
The fingerprint for the keypair. The fingerprint for the keypair.
keypair_id:
description: |
The keypair ID.
in: body
required: true
type: integer
keypair_links: keypair_links:
description: | description: |
Links pertaining to keypair. See `API Guide / Links and Links pertaining to keypair. See `API Guide / Links and
@ -2815,8 +2821,21 @@ keypair_type:
required: true required: true
type: string type: string
description: | description: |
The type of the keypair. Allowed values are ``ssh`` or ``x509`` The type of the keypair. Allowed values are ``ssh`` or ``x509``.
min_version: 2.2 min_version: 2.2
keypair_type_in:
in: body
required: false
type: string
description: |
The type of the keypair. Allowed values are ``ssh`` or ``x509``.
min_version: 2.2
keypair_updated_deleted_at:
description: |
It is always ``null``.
in: body
required: true
type: none
# NOTE(mriedem): This is the user_id description for the keypair create/show # NOTE(mriedem): This is the user_id description for the keypair create/show
# response which has always been returned. # response which has always been returned.
keypair_userid: keypair_userid: