Merge "api-ref: fix the wrong required/optional marker"

This commit is contained in:
Zuul 2018-05-03 16:33:46 +00:00 committed by Gerrit Code Review
commit 16d6e6ee52
2 changed files with 130 additions and 19 deletions

View File

@ -37,24 +37,24 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- name: name - name: name-request
- image: image - image: image
- command: command - command: command-request
- cpu: cpu - cpu: cpu-request
- memory: memory - memory: memory-request
- workdir: workdir - workdir: workdir-request
- image_pull_policy: image_pull_policy - image_pull_policy: image_pull_policy-request
- labels: labels - labels: labels-request
- environment: environment - environment: environment-request
- restart_policy: restart_policy - restart_policy: restart_policy-request
- interactive: interactive - interactive: interactive-request
- image_driver: image_driver - image_driver: image_driver-request
- security_groups: security_groups - security_groups: security_groups-request
- nets: nets - nets: nets
- runtime: runtime - runtime: runtime
- hostname: hostname - hostname: hostname-request
- auto_remove: auto_remove - auto_remove: auto_remove-request
- auto_heal: auto_heal - auto_heal: auto_heal-request
- availability_zone: container_availability_zone - availability_zone: container_availability_zone
- hints: hints - hints: hints
- mounts: mounts - mounts: mounts

View File

@ -186,12 +186,27 @@ auto_heal:
description: | description: |
The flag of healing non-existent container in docker. The flag of healing non-existent container in docker.
in: body in: body
required: true
type: boolean
auto_heal-request:
description: |
The flag of healing non-existent container in docker.
in: body
required: false
type: boolean type: boolean
auto_remove: auto_remove:
description: | description: |
enable auto-removal of the container on daemon side enable auto-removal of the container on daemon side
when the container's process exits. when the container's process exits.
in: body in: body
required: true
type: boolean
auto_remove-request:
description: |
enable auto-removal of the container on daemon side
when the container's process exits.
in: body
required: false
type: boolean type: boolean
availability_zone: availability_zone:
in: body in: body
@ -209,6 +224,13 @@ command:
description: | description: |
Send command to the container. Send command to the container.
in: body in: body
required: true
type: string
command-request:
description: |
Send command to the container.
in: body
required: false
type: string type: string
container_action: container_action:
description: | description: |
@ -231,7 +253,7 @@ container_actions:
container_availability_zone: container_availability_zone:
in: body in: body
type: string type: string
required: true required: false
description: | description: |
The availability zone from which to run the container. Typically, The availability zone from which to run the container. Typically,
an admin user will use availability zones to arrange container hosts into an admin user will use availability zones to arrange container hosts into
@ -253,6 +275,13 @@ cpu:
description: | description: |
The number of virtual cpus. The number of virtual cpus.
in: body in: body
required: true
type: float
cpu-request:
description: |
The number of virtual cpus.
in: body
required: false
type: float type: float
created_at: created_at:
description: | description: |
@ -295,7 +324,14 @@ environment:
description: | description: |
The environment variables. The environment variables.
in: body in: body
type: array required: true
type: object
environment-request:
description: |
The environment variables.
in: body
required: false
type: object
event: event:
description: | description: |
The name of the event. The name of the event.
@ -381,7 +417,7 @@ hints:
description: | description: |
The dictionary of data to send to the scheduler. The dictionary of data to send to the scheduler.
in: body in: body
required: true required: false
type: string type: string
host: host:
description: | description: |
@ -400,6 +436,13 @@ hostname:
description: | description: |
The hostname of container. The hostname of container.
in: body in: body
required: true
type: string
hostname-request:
description: |
The hostname of container.
in: body
required: false
type: string type: string
id_s: id_s:
description: | description: |
@ -414,11 +457,18 @@ image:
required: true required: true
type: string type: string
image_driver: image_driver:
description: |
The image driver to use to pull container image.
in: body
required: true
type: string
image_driver-request:
description: | description: |
The image driver to use to pull container image. Allowed values are The image driver to use to pull container image. Allowed values are
``docker`` to pull the image from Docker Hub and ``glance`` to pull ``docker`` to pull the image from Docker Hub and ``glance`` to pull
the image from Glance. the image from Glance.
in: body in: body
required: false
type: string type: string
image_pull_policy: image_pull_policy:
description: | description: |
@ -427,11 +477,28 @@ image_pull_policy:
image if it does not already exist on the node, ``always`` means always image if it does not already exist on the node, ``always`` means always
pull the image from repository and ``never`` mean never pull the image. pull the image from repository and ``never`` mean never pull the image.
in: body in: body
required: true
type: string
image_pull_policy-request:
description: |
The policy which determines if the image should be pulled prior to starting
the container. Allowed values are ``ifnotpresent`` that means pull the
image if it does not already exist on the node, ``always`` means always
pull the image from repository and ``never`` mean never pull the image.
in: body
required: false
type: string type: string
interactive: interactive:
description: | description: |
Keep STDIN open even if not attached, allocate a pseudo-TTY. Keep STDIN open even if not attached, allocate a pseudo-TTY.
in: body in: body
required: true
type: boolean
interactive-request:
description: |
Keep STDIN open even if not attached, allocate a pseudo-TTY.
in: body
required: false
type: boolean type: boolean
ip_address: ip_address:
description: | description: |
@ -440,10 +507,17 @@ ip_address:
required: true required: true
type: string type: string
labels: labels:
description: |
A map of labels of the container.
in: body
required: true
type: object
labels-request:
description: | description: |
Adds a map of labels to a container. Adds a map of labels to a container.
in: body in: body
type: array required: false
type: object
links: links:
description: | description: |
A list of relative links. Includes the self and A list of relative links. Includes the self and
@ -455,6 +529,13 @@ memory:
description: | description: |
The container memory size in MiB. The container memory size in MiB.
in: body in: body
required: true
type: integer
memory-request:
description: |
The container memory size in MiB.
in: body
required: false
type: integer type: integer
message: message:
description: | description: |
@ -481,6 +562,12 @@ name:
in: body in: body
required: true required: true
type: string type: string
name-request:
description: |
The name of the container.
in: body
required: false
type: string
net_id: net_id:
description: | description: |
The UUID of network. The UUID of network.
@ -545,6 +632,16 @@ restart_policy:
``unless-stopped``. Optionally, it can contain a ``MaximumRetryCount`` key ``unless-stopped``. Optionally, it can contain a ``MaximumRetryCount`` key
and its value is an integer. and its value is an integer.
in: body in: body
required: true
type: object
restart_policy-request:
description: |
Restart policy to apply when a container exits. It must contain a
``Name`` key and its allowed values are ``no``, ``on-failure``, ``always``,
``unless-stopped``. Optionally, it can contain a ``MaximumRetryCount`` key
and its value is an integer.
in: body
required: false
type: object type: object
runtime: runtime:
description: | description: |
@ -557,6 +654,13 @@ security_groups:
description: | description: |
Security groups to be added to the container. Security groups to be added to the container.
in: body in: body
required: true
type: string
security_groups-request:
description: |
Security groups to be added to the container.
in: body
required: false
type: string type: string
service: service:
description: | description: |
@ -677,4 +781,11 @@ workdir:
description: | description: |
The working directory for commands to run in. The working directory for commands to run in.
in: body in: body
required: true
type: string
workdir-request:
description: |
The working directory for commands to run in.
in: body
required: false
type: string type: string