api-ref: Parameter verification for servers.inc (3/3)

This patch completes parameter verification for servers.inc.

* Verifies remaining parameters
* Sorts parameters
* Adds missing parameters
* Removing unncessary parameters

Change-Id: If01b2dcfa9df8c0e80ad1da65115204fe321891b
Closes-Bug: #1738930
This commit is contained in:
Takashi NATSUME
2018-03-08 10:09:25 +09:00
parent bab3184ced
commit 39fbcfd518
2 changed files with 77 additions and 74 deletions

View File

@@ -1176,6 +1176,9 @@ sort_key_server:
- ``user_id``
- ``uuid``
- ``vm_state``
``host`` and ``node`` are only allowed for admin.
If non-admin users specify them, a 403 error is returned.
in: query
required: false
type: string
@@ -1874,9 +1877,11 @@ config_drive_diagnostics:
config_drive_resp:
description: |
Indicates whether or not a config drive was used for this server.
The value is ``True`` or an empty string. An empty string stands for
``False``.
in: body
required: true
type: boolean
type: string
configure_project_cloudpipe:
description: |
VPN IP and Port information to configure the cloudpipe instance..
@@ -4396,14 +4401,16 @@ network_uuid:
type: string
networks:
description: |
A ``networks`` object. Required parameter when there are multiple networks defined
for the tenant. When you do not specify the networks parameter, the server attaches
to the only network created for the current tenant. Optionally, you can create
one or more NICs on the server. To provision the server instance with a NIC for
a network, specify the UUID of the network in the ``uuid`` attribute in a ``networks``
object. To provision the server instance with a NIC for an already existing port,
specify the port-id in the ``port`` attribute in a ``networks`` object.
A list of ``network`` object. Required parameter when there are multiple
networks defined for the tenant. When you do not specify the networks
parameter, the server attaches to the only network created for the
current tenant. Optionally, you can create one or more NICs on the server.
To provision the server instance with a NIC for a network, specify
the UUID of the network in the ``uuid`` attribute in a ``networks``
object. To provision the server instance with a NIC for an already
existing port, specify the port-id in the ``port`` attribute in a
``networks`` object.
If multiple networks are defined, the order in which they appear in the
guest operating system will not necessarily reflect the order in which they
are given in the server boot request. Guests should therefore not depend
@@ -4422,18 +4429,18 @@ networks:
attribute.
Starting with microversion 2.37, this field is required and the special
values *auto* and *none* can be specified for networks. *auto* tells the
Compute service to use a network that is available to the project, if one
exists. If one does not exist, the Compute service will attempt to
automatically allocate a network for the project (if possible). *none*
tells the Compute service to not allocate a network for the instance. The
*auto* and *none* values cannot be used with any other network values,
including other network uuids, ports, fixed IPs or device tags. These are
requested as strings for the networks value, not in a list. See the
associated example.
string values *auto* and *none* can be specified for networks. *auto*
tells the Compute service to use a network that is available to the
project, if one exists. If one does not exist, the Compute service will
attempt to automatically allocate a network for the project (if possible).
*none* tells the Compute service to not allocate a network for the
instance. The *auto* and *none* values cannot be used with any other
network values, including other network uuids, ports, fixed IPs or device
tags. These are requested as strings for the networks value, not in a
list. See the associated example.
in: body
required: true
type: object
type: array
networks_quota_optional: &networks_quota_optional
description: |
The number of private networks that can be created per project.
@@ -5058,9 +5065,11 @@ private_key:
type: string
progress:
description: |
A percentage value of the build progress.
A percentage value of the operation progress.
This parameter only appears when the server status is ``ACTIVE``,
``BUILD``, ``REBUILD``, ``RESIZE``, ``VERIFY_RESIZE`` or ``MIGRATING``.
in: body
required: true
required: false
type: integer
project_id:
description: |
@@ -5538,10 +5547,11 @@ server_groups_quota_optional:
type: integer
server_hostname:
in: body
required: true
required: false
type: string
description: |
The hostname set on the instance when it is booted.
By default, it appears in the response for administrative users only.
min_version: 2.3
server_id:
description: |
@@ -5557,18 +5567,20 @@ server_id_optional:
type: string
server_kernel_id:
in: body
required: true
required: false
type: string
description: |
The UUID of the kernel image when using an AMI. Will be null if not.
By default, it appears in the response for administrative users only.
min_version: 2.3
server_launch_index:
in: body
required: true
required: false
type: integer
description: |
When servers are launched via multiple create, this is the
sequence in which the servers were launched.
By default, it appears in the response for administrative users only.
min_version: 2.3
server_links:
description: |
@@ -5593,26 +5605,29 @@ server_name_optional:
type: string
server_ramdisk_id:
in: body
required: true
required: false
type: string
description: |
The UUID of the ramdisk image when using an AMI. Will be null if not.
By default, it appears in the response for administrative users only.
min_version: 2.3
server_reservation_id:
in: body
required: true
required: false
type: string
description: |
The reservation id for the server. This is an id that can
be useful in tracking groups of servers created with multiple
create, that will all have the same reservation_id.
By default, it appears in the response for administrative users only.
min_version: 2.3
server_root_device_name:
in: body
required: true
required: false
type: string
description: |
The root device name for the instance
By default, it appears in the response for administrative users only.
min_version: 2.3
server_status:
description: |

View File

@@ -1,6 +1,4 @@
.. -*- rst -*-
.. TODO(sdague) parameter microversions need to be gone through in the
response (request side should be good)
.. needs:example_verification
.. needs:body_verification
@@ -242,6 +240,7 @@ Response
- id: server_id
- links: links
- name: server_name
- servers_links: servers_links
**Example List Servers**
@@ -338,22 +337,17 @@ Request
- server: server
- name: server_name
- flavorRef: flavorRef
- imageRef: imageRef
- security_groups: security_groups
- metadata: metadata
- accessIPv4: accessIPv4_in
- accessIPv6: accessIPv6_in
- adminPass: adminPass_request
- user_data: user_data
- availability_zone: os-availability-zone:availability_zone
- name: server_name
- networks: networks
- networks.uuid: network_uuid
- networks.port: port
- networks.fixed_ip: fixed_ip
- networks.tag: device_tag_nic
- personality: personality
- accessIPv4: accessIPv4_in
- accessIPv6: accessIPv6_in
- adminPass: adminPass_request
- availability_zone: os-availability-zone:availability_zone
- block_device_mapping_v2: block_device_mapping_v2
- block_device_mapping_v2.boot_index: boot_index
- block_device_mapping_v2.delete_on_termination: delete_on_termination
@@ -368,8 +362,13 @@ Request
- block_device_mapping_v2.volume_size: volume_size
- block_device_mapping_v2.tag: device_tag_bdm
- config_drive: config_drive
- imageRef: imageRef
- key_name: key_name
- metadata: metadata
- OS-DCF:diskConfig: OS-DCF:diskConfig
- personality: personality
- security_groups: security_groups
- user_data: user_data
- description: server_description
- tags: server_tags_create
- os:scheduler_hints: os:scheduler_hints
@@ -397,6 +396,7 @@ Response
.. rest_parameters:: parameters.yaml
- Location: server_location
- server: server
- id: server_id
- links: links
@@ -547,7 +547,10 @@ Response
.. rest_parameters:: parameters.yaml
- server: server
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- addresses: addresses
- config_drive: config_drive_resp
- created: created
- flavor: flavor_server
- flavor.id: flavor_id_body_2_46
@@ -568,9 +571,6 @@ Response
- links: links
- metadata: metadata_compat
- name: server_name
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- config_drive: config_drive_resp
- OS-DCF:diskConfig: disk_config
- OS-EXT-AZ:availability_zone: OS-EXT-AZ:availability_zone
- OS-EXT-SRV-ATTR:host: OS-EXT-SRV-ATTR:host
@@ -584,11 +584,9 @@ Response
- os-extended-volumes:volumes_attached.delete_on_termination: os-extended-volumes:volumes_attached.delete_on_termination
- OS-SRV-USG:launched_at: OS-SRV-USG:launched_at
- OS-SRV-USG:terminated_at: OS-SRV-USG:terminated_at
- progress: progress
- security_groups: security_groups_obj
- security_group.name: name
- status: server_status
- host_status: host_status
- tenant_id: tenant_id_body
- updated: updated
- user_id: user_id
@@ -597,6 +595,8 @@ Response
- fault.created: fault_created
- fault.message: fault_message
- fault.details: fault_details
- progress: progress
- servers_links: servers_links
- OS-EXT-SRV-ATTR:hostname: server_hostname
- OS-EXT-SRV-ATTR:reservation_id: server_reservation_id
- OS-EXT-SRV-ATTR:launch_index: server_launch_index
@@ -605,6 +605,9 @@ Response
- OS-EXT-SRV-ATTR:root_device_name: server_root_device_name
- OS-EXT-SRV-ATTR:user_data: server_user_data
- locked: locked
- host_status: host_status
- description: server_description_resp
- tags: tags
**Example List Servers Detailed (2.47)**
@@ -651,7 +654,10 @@ Response
.. rest_parameters:: parameters.yaml
- server: server
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- addresses: addresses
- config_drive: config_drive_resp
- created: created
- flavor: flavor_server
- flavor.id: flavor_id_body_2_46
@@ -672,9 +678,6 @@ Response
- links: links
- metadata: metadata_compat
- name: server_name
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- config_drive: config_drive_resp
- OS-DCF:diskConfig: disk_config
- OS-EXT-AZ:availability_zone: OS-EXT-AZ:availability_zone
- OS-EXT-SRV-ATTR:host: OS-EXT-SRV-ATTR:host
@@ -688,11 +691,9 @@ Response
- os-extended-volumes:volumes_attached.delete_on_termination: os-extended-volumes:volumes_attached.delete_on_termination
- OS-SRV-USG:launched_at: OS-SRV-USG:launched_at
- OS-SRV-USG:terminated_at: OS-SRV-USG:terminated_at
- progress: progress
- security_groups: security_groups_obj
- security_group.name: name
- status: server_status
- host_status: host_status
- tenant_id: tenant_id_body
- updated: updated
- user_id: user_id
@@ -701,6 +702,7 @@ Response
- fault.created: fault_created
- fault.message: fault_message
- fault.details: fault_details
- progress: progress
- OS-EXT-SRV-ATTR:hostname: server_hostname
- OS-EXT-SRV-ATTR:reservation_id: server_reservation_id
- OS-EXT-SRV-ATTR:launch_index: server_launch_index
@@ -709,6 +711,9 @@ Response
- OS-EXT-SRV-ATTR:root_device_name: server_root_device_name
- OS-EXT-SRV-ATTR:user_data: server_user_data
- locked: locked
- host_status: host_status
- description: server_description_resp
- tags: tags
**Example Show Server Details (2.47)**
@@ -733,6 +738,7 @@ Request
.. rest_parameters:: parameters.yaml
- server_id: server_id_path
- server: server
- accessIPv4: accessIPv4_in
- accessIPv6: accessIPv6_in
- name: server_name_optional
@@ -764,6 +770,8 @@ Response
.. rest_parameters:: parameters.yaml
- server: server
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- addresses: addresses
- created: created
- flavor: flavor_server
@@ -781,27 +789,11 @@ Response
- hostId: hostId
- id: server_id
- image: image
- key_name: key_name
- links: links
- metadata: metadata
- metadata: metadata_compat
- name: server_name
- accessIPv4: accessIPv4
- accessIPv6: accessIPv6
- OS-DCF:diskConfig: OS-DCF:diskConfig
- OS-EXT-AZ:availability_zone: OS-EXT-AZ:availability_zone
- OS-EXT-SRV-ATTR:host: OS-EXT-SRV-ATTR:host
- OS-EXT-SRV-ATTR:hypervisor_hostname: OS-EXT-SRV-ATTR:hypervisor_hostname
- OS-EXT-SRV-ATTR:instance_name: OS-EXT-SRV-ATTR:instance_name
- OS-EXT-STS:power_state: OS-EXT-STS:power_state
- OS-EXT-STS:task_state: OS-EXT-STS:task_state
- OS-EXT-STS:vm_state: OS-EXT-STS:vm_state
- OS-SRV-USG:launched_at: OS-SRV-USG:launched_at
- OS-SRV-USG:terminated_at: OS-SRV-USG:terminated_at
- progress: progress
- security_groups: security_groups_obj
- security_group.name: name
- OS-DCF:diskConfig: disk_config
- status: server_status
- host_status: host_status
- tenant_id: tenant_id_body
- updated: updated
- user_id: user_id
@@ -810,14 +802,10 @@ Response
- fault.created: fault_created
- fault.message: fault_message
- fault.details: fault_details
- OS-EXT-SRV-ATTR:hostname: server_hostname
- OS-EXT-SRV-ATTR:reservation_id: server_reservation_id
- OS-EXT-SRV-ATTR:launch_index: server_launch_index
- OS-EXT-SRV-ATTR:kernel_id: server_kernel_id
- OS-EXT-SRV-ATTR:ramdisk_id: server_ramdisk_id
- OS-EXT-SRV-ATTR:root_device_name: server_root_device_name
- OS-EXT-SRV-ATTR:user_data: server_user_data
- progress: progress
- locked: locked
- description: server_description_resp
- tags: tags
**Example Update server name (2.47)**