648a9cdaaa
Support creating container with existing neutron port. Users can pass the uuid/name of an existing neutron port via the 'nets' parameter. If port is specified, Zun will use the existing port instead of creating a new port. If a container is deleted, its neutron port will be deleted regardless of existing or not. A future work is to determine if the port is pre-existing and avoid deleting existing port. Closes-Bug: #1702581 Change-Id: I204b4bbe3de9e275690c4a64acdfe557f134b7ee
299 lines
7.2 KiB
YAML
299 lines
7.2 KiB
YAML
request_id:
|
|
type: UUID
|
|
in: header
|
|
required: true
|
|
description: |
|
|
A unique ID for tracking service request. The request ID associated
|
|
with the request by default appears in the service logs.
|
|
container_ident:
|
|
description: |
|
|
The UUID or name of container in Zun.
|
|
in: path
|
|
required: true
|
|
type: string
|
|
force:
|
|
description: |
|
|
Specify to delete container forcefully.
|
|
in: query
|
|
required: true
|
|
type: string
|
|
timeout:
|
|
description: |
|
|
Seconds to wait before operating on container.
|
|
in: query
|
|
required: true
|
|
type: string
|
|
addresses:
|
|
type: string
|
|
description: |
|
|
IP address of the container. This includes both ipv4 and/or ipv6 addresses.
|
|
in: body
|
|
required: true
|
|
binary:
|
|
in: body
|
|
type: string
|
|
required: true
|
|
description: |
|
|
The name of the binary form of the Zun service.
|
|
command:
|
|
description: |
|
|
Send command to the container.
|
|
in: body
|
|
type: string
|
|
container_list:
|
|
type: array
|
|
in: body
|
|
required: true
|
|
description: |
|
|
The list of all containers in Zun.
|
|
cpu:
|
|
description: |
|
|
The number of virtual cpus.
|
|
in: body
|
|
type: float
|
|
created_at:
|
|
description: |
|
|
The date and time when the resource was created.
|
|
|
|
The date and time stamp format is `ISO 8601
|
|
<https://en.wikipedia.org/wiki/ISO_8601>`_:
|
|
|
|
::
|
|
|
|
CCYY-MM-DDThh:mm:ss±hh:mm
|
|
|
|
For example, ``2015-08-27T09:49:58-05:00``.
|
|
|
|
The ``±hh:mm`` value, if included, is the time zone as an offset
|
|
from UTC.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
disabled:
|
|
description: |
|
|
Whether or not this service is disabled or not.
|
|
in: body
|
|
required: true
|
|
type: boolean
|
|
disabled_reason:
|
|
description: |
|
|
The disable reason of the service, ``null`` if the service is enabled or
|
|
disabled without reason provided.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
environment:
|
|
description: |
|
|
The environment variables.
|
|
in: body
|
|
type: array
|
|
forced_down:
|
|
description: |
|
|
Whether or not this service was forced down manually by an
|
|
administrator. This value is useful to know that some 3rd party has
|
|
verified the service should be marked down.
|
|
in: body
|
|
required: true
|
|
type: boolean
|
|
host:
|
|
description: |
|
|
The host for the service.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
hostname:
|
|
description: |
|
|
The host where container is running.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
id_s:
|
|
description: |
|
|
The ID of the Zun service.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
image:
|
|
description: |
|
|
The name or ID of the image.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
image_driver:
|
|
description: |
|
|
The image driver to use to pull container image. Allowed values are
|
|
``docker`` to pull the image from Docker Hub and ``glance`` to pull
|
|
the image from Glance.
|
|
in: body
|
|
type: string
|
|
image_pull_policy:
|
|
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
|
|
type: string
|
|
interactive:
|
|
description: |
|
|
Keep STDIN open even if not attached, allocate a pseudo-TTY.
|
|
in: body
|
|
type: boolean
|
|
labels:
|
|
description: |
|
|
Adds a map of labels to a container.
|
|
in: body
|
|
type: array
|
|
links:
|
|
description: |
|
|
A list of relative links. Includes the self and
|
|
bookmark links.
|
|
in: body
|
|
required: true
|
|
type: array
|
|
memory:
|
|
description: |
|
|
The container memory size in MiB.
|
|
in: body
|
|
type: integer
|
|
name:
|
|
description: |
|
|
The name of the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
nets:
|
|
description: |
|
|
A list of networks for the container. When you do not specify the nets
|
|
parameter, the container attaches to the only network created for the
|
|
current tenant. To provision the container with a NIC for a network,
|
|
specify the UUID or name of the network in the ``network`` attribute.
|
|
To provision the container with a NIC for an already existing port,
|
|
specify the port id or name in the ``port`` attribute.
|
|
|
|
If multiple networks are defined, the order in which they appear in the
|
|
container will not necessarily reflect the order in which they are given
|
|
in the request. Users should therefore not depend on device order
|
|
to deduce any information about their network devices.
|
|
|
|
The special values *auto* and can be specified for networks. *auto* tells
|
|
the Containers service to use a network that is available to the project,
|
|
if one exists. If one does not exist, the Containers service will attempt
|
|
to automatically allocate a network for the project (if possible). *none*
|
|
tells the Containers 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.
|
|
in: body
|
|
type: object
|
|
new_name:
|
|
description: |
|
|
The new name for the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
ports:
|
|
description: |
|
|
The ports exposed on the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
report_count:
|
|
description: |
|
|
The total number of report.
|
|
in: body
|
|
required: true
|
|
type: integer
|
|
restart_policy:
|
|
description: |
|
|
Restart policy to apply when a container exits. Allowed values are
|
|
no, on-failure[:max-retry], always, unless-stopped.
|
|
in: body
|
|
type: string
|
|
security_groups:
|
|
description: |
|
|
Security groups to be added to the container.
|
|
in: body
|
|
type: string
|
|
service:
|
|
description: |
|
|
A Zun service.
|
|
in: body
|
|
required: true
|
|
type: dict
|
|
services:
|
|
description: |
|
|
A list of Zun services.
|
|
in: body
|
|
required: true
|
|
type: array
|
|
state:
|
|
description: |
|
|
The current state of Zun services.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
stats_info:
|
|
description: |
|
|
The stats information of a container,
|
|
including cpu, memory, blk io and net io.
|
|
in: body
|
|
required: true
|
|
type: dict
|
|
status:
|
|
description: |
|
|
The current state of the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
status_detail:
|
|
description: |
|
|
The status detail of the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
status_reason:
|
|
description: |
|
|
The reason of container current status.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
task_state:
|
|
description: |
|
|
The current task of the container.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
updated_at:
|
|
description: |
|
|
The date and time when the resource was updated.
|
|
|
|
The date and time stamp format is `ISO 8601
|
|
<https://en.wikipedia.org/wiki/ISO_8601>`_:
|
|
|
|
::
|
|
|
|
CCYY-MM-DDThh:mm:ss±hh:mm
|
|
|
|
For example, ``2015-08-27T09:49:58-05:00``.
|
|
|
|
The ``±hh:mm`` value, if included, is the time zone as an offset
|
|
from UTC. In the previous example, the offset value is ``-05:00``.
|
|
|
|
If the ``updated_at`` date and time stamp is not set, its value is
|
|
``null``.
|
|
in: body
|
|
required: true
|
|
type: string
|
|
uuid:
|
|
description: |
|
|
UUID of the resource.
|
|
in: body
|
|
required: true
|
|
type: UUID
|
|
workdir:
|
|
description: |
|
|
The working directory for commands to run in.
|
|
in: body
|
|
type: string
|