Import RST files for documentation

This is the results of the RST conversion from WADL. It creates a
single index plus a bunch of included files which represent sections
of the API document. This is the starting point for fixing the
documentation.

Change-Id: I7d561c2ecdcd864172dedb54a551f17ad3bdfe26
This commit is contained in:
Sean Dague
2016-04-12 09:03:46 -04:00
parent f1fa7eb15a
commit d4e2771440
58 changed files with 8201 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
.. -*- rst -*-
============================================
Servers diagnostics (servers, diagnostics)
============================================
Shows the usage data for a server.
Show Server Diagnostics
=======================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/diagnostics
Shows basic usage data for a server.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example Server diagnostics: JSON response**
.. literalinclude:: ../../doc/api_samples/diagnostics/server-diagnostics-show-resp.json
:language: javascript

View File

@@ -0,0 +1,51 @@
.. -*- rst -*-
=========================
Extensions (extensions)
=========================
Lists available extensions and shows information for an extension, by
alias.
OpenStack Compute API v2.0 supports extensions. However, extensions are
deprecated in Compute API v2.1. For information about extensions, see
`Extensions <http://developer.openstack.org/api-guide/compute/extensions.html>`__.
Show Extension Details
======================
.. rest_method:: GET /v2.1/{tenant_id}/extensions/{alias}
Shows details for an extension, by alias.
Normal response codes: 200,203
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- alias: alias
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- extension: extension
- name: name
- alias: alias
- links: links
- namespace: namespace
- description: description
- updated: updated
**Example Show Extension Details: JSON request**
.. literalinclude:: ../../doc/api_samples/extensions/extension-show-resp.json
:language: javascript

169
api-ref/source/flavors.inc Normal file
View File

@@ -0,0 +1,169 @@
.. -*- rst -*-
============================================
Flavors with extended attributes (flavors)
============================================
Shows information about flavors.
List Flavors
============
.. rest_method:: GET /v2.1/{tenant_id}/flavors
Lists flavors.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- minDisk: minDisk
- minRam: minRam
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response
^^^^^^^^
**Example List Flavors: JSON request**
.. literalinclude:: ../../doc/api_samples/flavors/flavors-list-resp.json
:language: javascript
Create Flavor
=============
.. rest_method:: POST /v2.1/{tenant_id}/flavors
Creates a flavor.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Create Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/flavors/flavor-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/flavors/flavor-create-resp.json
:language: javascript
Show Flavor Details
===================
.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}
Shows details for a flavor.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
Response
^^^^^^^^
**Example Show Flavor Details: JSON request**
.. literalinclude:: ../../doc/api_samples/flavors/flavor-show-resp.json
:language: javascript
Delete Flavor
=============
.. rest_method:: DELETE /v2.1/{tenant_id}/flavors/{flavor_id}
Deletes a flavor.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
Response
^^^^^^^^
List Flavors With Details
=========================
.. rest_method:: GET /v2.1/{tenant_id}/flavors/detail
Lists flavors with details.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- minDisk: minDisk
- minRam: minRam
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response
^^^^^^^^
**Example List Flavors With Details: JSON request**
.. literalinclude:: ../../doc/api_samples/flavors/flavors-list-detail-resp.json
:language: javascript

154
api-ref/source/images.inc Normal file
View File

@@ -0,0 +1,154 @@
.. -*- rst -*-
========
Images
========
Lists, shows details for, and deletes images. Also sets, lists, shows
details for, and deletes image metadata.
An image is a collection of files that you use to create and rebuild a
server. By default, operators provide pre-built operating system images.
You can also create custom images. See Compute server actions.
By default, the ``policy.json`` file authorizes all users to view the
image size in the ``OS-EXT-IMG-SIZE:size`` extended attribute.
Show Image Details
==================
.. rest_method:: GET //v2.1/{tenant_id}/images/{image_id}
Shows details for an image.
Normal response codes: 200,203,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- image_id: image_id
Response
^^^^^^^^
**Example Show Image Details: JSON request**
.. literalinclude:: ../../doc/api_samples/images/image-show-resp.json
:language: javascript
Delete Image
============
.. rest_method:: DELETE //v2.1/{tenant_id}/images/{image_id}
Deletes an image.
Normal response codes: 204,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- image_id: image_id
Response
^^^^^^^^
Show Image Metadata Item Details
================================
.. rest_method:: GET //v2.1/{tenant_id}/images/{image_id}/metadata/{key}
Shows details for a metadata item, by key, for an image.
Normal response codes: 200,203,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- image_id: image_id
- key: key
Response
^^^^^^^^
**Example Show Image Metadata Item Details: JSON request**
.. literalinclude:: ../../doc/api_samples/images/image-metadata-item-show-resp.json
:language: javascript
Create Or Update Image Metadata Item
====================================
.. rest_method:: PUT //v2.1/{tenant_id}/images/{image_id}/metadata/{key}
Creates or updates a metadata item, by key, for an image.
Normal response codes: 200,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- image_id: image_id
- key: key
**Example Create Or Update Image Metadata Item: JSON request**
.. literalinclude:: ../../doc/api_samples/images/image-metadata-item-update-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Update Image Metadata Item: JSON request**
.. literalinclude:: ../../doc/api_samples/images/image-metadata-item-update-resp.json
:language: javascript
Delete Image Metadata Item
==========================
.. rest_method:: DELETE //v2.1/{tenant_id}/images/{image_id}/metadata/{key}
Deletes a metadata item, by key, for an image.
Normal response codes: 204,,503,400,401,403,405,404,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- image_id: image_id
- key: key
Response
^^^^^^^^

View File

@@ -3,6 +3,60 @@
============= =============
Compute API Compute API
============= =============
.. include:: versions.inc
.. include:: versions.rst .. include:: servers.inc
.. include:: servers.rst .. include:: servers-multiple-create.inc
.. include:: servers-actions.inc
.. include:: servers-action-fixed-ip.inc
.. include:: servers-action-evacuate.inc
.. include:: servers-action-deferred-delete.inc
.. include:: servers-action-console-output.inc
.. include:: servers-action-remote-consoles.inc
.. include:: servers-action-shelve.inc
.. include:: servers-action-crash-dump.inc
.. include:: servers-admin-action.inc
.. include:: diagnostics.inc
.. include:: ips.inc
.. include:: metadata.inc
.. include:: os-instance-actions.inc
.. include:: os-interface.inc
.. include:: os-server-password.inc
.. include:: os-virtual-interfaces.inc
.. include:: os-volume-attachments.inc
.. include:: flavors.inc
.. include:: os-flavor-access.inc
.. include:: os-flavor-extra-specs.inc
.. include:: os-keypairs.inc
.. include:: limits.inc
.. include:: extensions.inc
.. include:: images.inc
.. include:: os-agents.inc
.. include:: os-aggregates.inc
.. include:: os-assisted-volume-snapshots.inc
.. include:: os-availability-zone.inc
.. include:: os-baremetal-nodes.inc
.. include:: os-cells.inc
.. include:: os-certificates.inc
.. include:: os-cloudpipe.inc
.. include:: os-consoles.inc
.. include:: os-fixed-ips.inc
.. include:: os-floating-ip-dns.inc
.. include:: os-floating-ip-pools.inc
.. include:: os-floating-ips.inc
.. include:: os-floating-ips-bulk.inc
.. include:: os-fping.inc
.. include:: os-hosts.inc
.. include:: os-hypervisors.inc
.. include:: os-instance-usage-audit-log.inc
.. include:: os-migrations.inc
.. include:: os-networks.inc
.. include:: os-quota-sets.inc
.. include:: os-security-groups.inc
.. include:: os-security-group-default-rules.inc
.. include:: os-security-group-rules.inc
.. include:: os-server-external-events.inc
.. include:: os-server-groups.inc
.. include:: os-services.inc
.. include:: os-simple-tenant-usage.inc
.. include:: os-tenant-network.inc
.. include:: os-volumes.inc

70
api-ref/source/ips.inc Normal file
View File

@@ -0,0 +1,70 @@
.. -*- rst -*-
============================
Servers IPs (servers, ips)
============================
Lists the IP addresses for an instance and shows details for an IP
address.
List Ips
========
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/ips
Lists IP addresses that are assigned to an instance.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/ips/ips-resp.json
:language: javascript
Show Ip Details
===============
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/ips/{network_label}
Shows IP addresses details for a network label of a server instance.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- network_label: network_label
Response
^^^^^^^^
**Example Show Ip Details: JSON request**
.. literalinclude:: ../../doc/api_samples/ips/ips-network-resp.json
:language: javascript

35
api-ref/source/limits.inc Normal file
View File

@@ -0,0 +1,35 @@
.. -*- rst -*-
=================
Limits (limits)
=================
Shows rate and absolute limits for the tenant.
Show Rate And Absolute Limits
=============================
.. rest_method:: GET /v2.1/{tenant_id}/limits
Shows rate and absolute limits for the tenant.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Show Rate And Absolute Limits: JSON request**
.. literalinclude:: ../../doc/api_samples/limits/limits-get-resp.json
:language: javascript

211
api-ref/source/metadata.inc Normal file
View File

@@ -0,0 +1,211 @@
.. -*- rst -*-
=====================================
Server metadata (servers, metadata)
=====================================
Lists metadata, creates or replaces one or more metadata items, and
updates one or more metadata items for a server.
Shows details for, creates or replaces, and updates a metadata item, by
key, for a server.
List All Metadata
=================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/metadata
Lists all metadata for a server.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List All Metadata: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-list-resp.json
:language: javascript
Create Or Replace Metadata Items
================================
.. rest_method:: PUT /v2.1/{tenant_id}/servers/{server_id}/metadata
Creates or replaces one or more metadata items for a server.
Creates any metadata items that do not already exist in the server. Removes and completely replaces any metadata items that already exist in the server with the metadata items in the request.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
**Example Create Or Replace Metadata Items: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Replace Metadata Items: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-list-resp.json
:language: javascript
Update Metadata Items
=====================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/metadata
Updates one or more metadata items for a server.
Replaces metadata items that match keys. Does not modify items that are not in the request.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
**Example Update Metadata Items: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Update Metadata Items: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-list-resp.json
:language: javascript
Show Metadata Item Details
==========================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/metadata/{key}
Shows details for a metadata item, by key, for a server.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- key: key
Response
^^^^^^^^
**Example Show Metadata Item Details: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-show-resp.json
:language: javascript
Create Or Update Metadata Item
==============================
.. rest_method:: PUT /v2.1/{tenant_id}/servers/{server_id}/metadata/{key}
Creates or replaces a metadata item, by key, for a server.
Creates a metadata item that does not already exist in the server. Removes and completely replaces a metadata item that already exists in the server with the metadata item in the request.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- key: key
**Example Create Or Update Metadata Item: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-item-update-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Update Metadata Item: JSON request**
.. literalinclude:: ../../doc/api_samples/metadata/server-metadata-item-show-resp.json
:language: javascript
Delete Metadata Item
====================
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/metadata/{key}
Deletes a metadata item, by key, from a server.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 204
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- key: key
Response
^^^^^^^^

View File

@@ -0,0 +1,143 @@
.. -*- rst -*-
==========================
Guest agents (os-agents)
==========================
Creates, lists, updates, and deletes guest agent builds. Use guest
agents to access files on the disk, configure networking, or run other
applications or scripts in the guest while the agent runs. This
hypervisor-specific extension is not currently enabled for KVM. Use of
guest agents is possible only if the underlying service provider uses
the Xen driver.
Create Agent Build
==================
.. rest_method:: POST /v2.1/{tenant_id}/os-agents
Creates an agent build.
Normal response codes: 201
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Create Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-create-resp.json
:language: javascript
List Agent Builds
=================
.. rest_method:: GET /v2.1/{tenant_id}/os-agents
Lists agent builds.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- agent_id: agent_id
- architecture: architecture
- hypervisor: hypervisor
- url: url
- md5hash: md5hash
- version: version
Response
^^^^^^^^
**Example List Agent Builds: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agents-list-resp.json
:language: javascript
Delete Agent Build
==================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-agents
Deletes an existing agent build.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
Update Agent Build
==================
.. rest_method:: PUT /v2.1/{tenant_id}/os-agents/{agent_build_id}
Updates an agent build.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- agent_build_id: agent_build_id
- url: url
- md5hash: md5hash
- version: version
**Example Update Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- agent_id: agent_id
- url: url
- md5hash: md5hash
- version: version
**Example Update Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-resp.json
:language: javascript

View File

@@ -0,0 +1,268 @@
.. -*- rst -*-
=========================================
Host aggregates (os-aggregates, action)
=========================================
Creates and manages host aggregates. An aggregate assigns metadata to
groups of compute nodes. Aggregates are only visible to the cloud
provider.
Create Aggregate
================
.. rest_method:: POST /v2.1/{tenant_id}/os-aggregates
Creates an aggregate in an availability zone.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Create Aggregate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Aggregate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-create-resp.json
:language: javascript
List Aggregates
===============
.. rest_method:: GET /v2.1/{tenant_id}/os-aggregates
Lists all aggregates. Includes the ID, name, and availability zone for each aggregate.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example List Aggregates: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-create-req.json
:language: javascript
Response
^^^^^^^^
**Example List Aggregates: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-list-resp.json
:language: javascript
Show Aggregate Details
======================
.. rest_method:: GET /v2.1/{tenant_id}/os-aggregates/{aggregate_id}
Shows details for an aggregate. Details include hosts and metadata.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
**Example Show Aggregate Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Show Aggregate Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-show-resp.json
:language: javascript
Delete Aggregate
================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-aggregates/{aggregate_id}
Deletes an aggregate.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
Response
^^^^^^^^
Update Aggregate
================
.. rest_method:: PUT /v2.1/{tenant_id}/os-aggregates/{aggregate_id}
Updates either or both the name and availability zone for an aggregate.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
**Example Update Aggregate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-update-req.json
:language: javascript
Response
^^^^^^^^
**Example Update Aggregate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-update-resp.json
:language: javascript
Add Host
========
.. rest_method:: POST /v2.1/{tenant_id}/os-aggregates/{aggregate_id}/action
Adds a host to an aggregate.
Specify the ``add_host`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
**Example Add Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-add-host-req.json
:language: javascript
Response
^^^^^^^^
**Example Add Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-add-host-resp.json
:language: javascript
Create Or Update Aggregate Metadata
===================================
.. rest_method:: POST /v2.1/{tenant_id}/os-aggregates/{aggregate_id}/action
Creates or replaces metadata for an aggregate.
Specify the ``set_metadata`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
**Example Create Or Update Aggregate Metadata: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-metadata-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Update Aggregate Metadata: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-metadata-create-resp.json
:language: javascript
Remove Host
===========
.. rest_method:: POST /v2.1/{tenant_id}/os-aggregates/{aggregate_id}/action
Removes a host from an aggregate.
Specify the ``remove_host`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- aggregate_id: aggregate_id
**Example Remove Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-remove-host-req.json
:language: javascript
Response
^^^^^^^^
**Example Remove Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-remove-host-resp.json
:language: javascript

View File

@@ -0,0 +1,89 @@
.. -*- rst -*-
==========================================================
Assisted volume snapshots (os-assisted-volume-snapshots)
==========================================================
Creates and deletes snapshots through an emulator/hypervisor. The qcow2
file format is supported.
An internal snapshot that lacks storage such as NFS or GlusterFS can use
an emulator/hypervisor to add the snapshot feature.
Create Assisted Volume Snapshots
================================
.. rest_method:: POST /v2.1/{tenant_id}/os-assisted-volume-snapshots
Creates an assisted volume snapshot.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot: snapshot
- volume_id: volume_id
- create_info: create_info
- snapshot_id: snapshot_id
- type: type
- new_file: new_file
**Example Create Assisted Volume Snapshots: JSON request**
.. literalinclude:: ../../doc/api_samples/os-assisted-volume-snapshots/snapshot-create-assisted-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- id: id
- volume_id: volume_id
**Example Create Assisted Volume Snapshots: JSON request**
.. literalinclude:: ../../doc/api_samples/os-assisted-volume-snapshots/snapshot-create-assisted-resp.json
:language: javascript
Delete Assisted Volume Snapshot
===============================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-assisted-volume-snapshots/{snapshot_id}
Deletes an assisted volume snapshot.
To make this request, add the ``delete_info`` query parameter to the URI, as follows:
DELETE /os-assisted-volume-snapshots?delete_info='{"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c"}'
Normal response codes: 204
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- delete_info: delete_info
Response
^^^^^^^^

View File

@@ -0,0 +1,62 @@
.. -*- rst -*-
===========================================
Availability zones (os-availability-zone)
===========================================
Shows availability zone information.
Get Availability Zone Information
=================================
.. rest_method:: GET /v2.1/{tenant_id}/os-availability-zone
Gets availability zone information.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Get availability zone information: JSON response**
.. literalinclude:: ../../doc/api_samples/os-availability-zone/availability-zone-show-resp.json
:language: javascript
Get Detailed Availability Zone Information
==========================================
.. rest_method:: GET /v2.1/{tenant_id}/os-availability-zone/detail
Gets detailed availability zone information.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Get detailed availability zone information: JSON response**
.. literalinclude:: ../../doc/api_samples/os-availability-zone/availability-zone-show-details-resp.json
:language: javascript

View File

@@ -0,0 +1,203 @@
.. -*- rst -*-
=======================================
Bare metal nodes (os-baremetal-nodes)
=======================================
Bare metal nodes.
Add Bare Metal Node
===================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes
Adds a bare metal node to a server.
Preconditions
You can add a bare metal node to a server with an ``ACTIVE``, ``PAUSED``, ``SHUTOFF``, ``VERIFY_RESIZE``, or ``SOFT_DELETED`` status.
You can add a bare metal node to a server with a status that is not locked.
Normal response codes: 202,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
**Example Add Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-create-req.json
:language: javascript
**Example Add Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-create-with-address-req.json
:language: javascript
Response
^^^^^^^^
**Example Add Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-create-resp.json
:language: javascript
**Example Add Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-create-with-address-resp.json
:language: javascript
List Bare Metal Nodes
=====================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes
Lists the bare metal nodes that are associated with a server.
Normal response codes: 202,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List Bare Metal Nodes: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-nodes-list-resp.json
:language: javascript
Add Interface To Bare Metal Node
================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes/action
Adds an interface to a bare metal node that is associated with a server.
Normal response codes: 202,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
**Example Add Interface To Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-add-interface-req.json
:language: javascript
Response
^^^^^^^^
**Example Add Interface To Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-add-interface-resp.json
:language: javascript
Delete Interface From Bare Metal Node
=====================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes/action
Deletes an interface from a bare metal node that is associated with a server.
Normal response codes: ,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
**Example Delete Interface From Bare Metal Node: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-remove-interface-req.json
:language: javascript
Response
^^^^^^^^
Show Bare Metal Node Details
============================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes/{node_id}
Shows details for a bare metal node.
Preconditions
The bare metal node must be associated with the server.
Normal response codes: 202,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- node_id: node_id
Response
^^^^^^^^
**Example Show Bare Metal Node Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-baremetal-nodes/baremetal-node-show-resp.json
:language: javascript
Delete Bare Metal Node
======================
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/os-baremetal-nodes/{node_id}
Deletes a bare metal node from a server.
Normal response codes: 202,,503,400,401,403,405,404,415,400,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- node_id: node_id
Response
^^^^^^^^

127
api-ref/source/os-cells.inc Normal file
View File

@@ -0,0 +1,127 @@
.. -*- rst -*-
==============================
Cells (os-cells, capacities)
==============================
Adds neighbor cells, lists neighbor cells, and shows the capabilities of
the local cell.
List Cells
==========
.. rest_method:: GET /v2.1/{tenant_id}/os-cells
Lists cells.
When cells are not enabled, the call returns the ``Not Implemented (501)`` response code.
Normal response codes: 200,501
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Cells: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cells/cells-list-resp.json
:language: javascript
List Cells With Details
=======================
.. rest_method:: GET /v2.1/{tenant_id}/os-cells
Lists cells with details.
When cells are not enabled, the call returns the ``Not Implemented (501)`` response code.
Normal response codes: 200,501
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Cells With Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cells/cells-list-empty-resp.json
:language: javascript
Show Cell Data
==============
.. rest_method:: GET /v2.1/{tenant_id}/os-cells/{cell_id}
Shows data for a cell.
When cells are not enabled, the call returns the ``Not Implemented (501)`` response code.
Normal response codes: 200,501
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- cell_id: cell_id
Response
^^^^^^^^
**Example Show Cell Data: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cells/cell-show-resp.json
:language: javascript
Show Cell Capacities
====================
.. rest_method:: GET /v2.1/{tenant_id}/os-cells/{cell_id}/capacities
Shows capacities for a cell.
When cells are not enabled, the call returns the ``Not Implemented (501)`` response code.
Normal response codes: 200,501
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- cell_id: cell_id
Response
^^^^^^^^
**Example Show Cell Capacities: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cells/cells-capacities-show-resp.json
:language: javascript

View File

@@ -0,0 +1,63 @@
.. -*- rst -*-
=====================================
Root certificates (os-certificates)
=====================================
Creates and shows details for a root certificate.
Create Certificate
==================
.. rest_method:: POST /v2.1/{tenant_id}/os-certificates
Creates a certificate.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Create Certificate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-certificates/certificate-create-resp.json
:language: javascript
Show Certificate Details
========================
.. rest_method:: GET /v2.1/{tenant_id}/os-certificates/{certificate_id}
Shows details for a certificate.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- certificate_id: certificate_id
Response
^^^^^^^^
**Example Show Certificate Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-certificates/certificate-show-root-resp.json
:language: javascript

View File

@@ -0,0 +1,97 @@
.. -*- rst -*-
==========================
Cloudpipe (os-cloudpipe)
==========================
Manages virtual VPNs for projects.
List Cloudpipes
===============
.. rest_method:: GET /v2.1/{tenant_id}/os-cloudpipe
Lists cloudpipes.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Cloudpipes: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-show-resp.json
:language: javascript
Create Cloudpipe
================
.. rest_method:: POST /v2.1/{tenant_id}/os-cloudpipe
Creates a cloudpipe.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- project_id: project_id
**Example Create Cloudpipe: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Cloudpipe: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-create-resp.json
:language: javascript
Update Cloudpipe
================
.. rest_method:: POST /v2.1/{tenant_id}/os-cloudpipe/configure-project
Updates the virtual private network (VPN) IP address and port for a cloudpipe instance.
Normal response codes: 202,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- vpn_ip: vpn_ip
- vpn_port: vpn_port
**Example Update Cloudpipe: JSON request**
.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-update-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,142 @@
.. -*- rst -*-
===============================================================
Server consoles (servers, os-consoles, os-console-auth-token)
===============================================================
Manages server consoles.
Create Console
==============
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/consoles
Creates a console for a server instance.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
Lists Consoles
==============
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/consoles
Lists all consoles for a server instance.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List consoles: JSON response**
.. literalinclude:: ../../doc/api_samples/os-consoles/consoles-list-resp.json
:language: javascript
Show Console Details
====================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/consoles/{console_id}
Shows details for a console for a server instance.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- console_id: console_id
Response
^^^^^^^^
**Example List consoles: JSON response**
.. literalinclude:: ../../doc/api_samples/os-consoles/consoles-list-resp.json
:language: javascript
Delete Console
==============
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/consoles/{console_id}
Deletes a console for a server instance.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- console_id: console_id
Response
^^^^^^^^
Show Console Authentication Token
=================================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-console-auth-token
Shows the authentication token for a console for a server instance.
This feature is available for ``rdp-html5`` console type only.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List consoles: JSON response**
.. literalinclude:: ../../doc/api_samples/os-consoles/console-auth-show-resp.json
:language: javascript

View File

@@ -0,0 +1,67 @@
.. -*- rst -*-
==========================
Fixed IPs (os-fixed-ips)
==========================
Shows data for a fixed IP, such as host name, CIDR, and address. Also,
reserves and frees a fixed IP address.
Show Fixed Ip Details
=====================
.. rest_method:: GET /v2.1/{tenant_id}/os-fixed-ips/{fixed_ip}
Shows details for a fixed IP address.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- fixed_ip: fixed_ip
Response
^^^^^^^^
**Example Show Fixed Ip Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-fixed-ips/fixedip-show-resp.json
:language: javascript
Reserve Or Release A Fixed Ip
=============================
.. rest_method:: POST /v2.1/{tenant_id}/os-fixed-ips/{fixed_ip}/action
Reserves or releases a fixed IP.
To reserve a fixed IP address, specify ``reserve`` in the request body. To release a fixed IP address, specify ``unreserve`` in the request body.
Normal response codes: 202,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- fixed_ip: fixed_ip
**Example Reserve Or Release A Fixed Ip: JSON request**
.. literalinclude:: ../../doc/api_samples/os-fixed-ips/fixedip-create-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,109 @@
.. -*- rst -*-
====================================================
Flavors access (flavors, os-flavor-access, action)
====================================================
Lists tenants who have access to a private flavor and adds private
flavor access to and removes private flavor access from tenants. By
default, only administrators can manage private flavor access. A private
flavor has ``is_public`` set to ``false`` while a public flavor has
``is_public`` set to ``true``.
List Flavor Access Information For Given Flavor
===============================================
.. rest_method:: GET /v2.1/{tenant_id}/flavors/os-flavor-access
Lists flavor access information.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Flavor Access Information For Given Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-access/flavor-access-list-resp.json
:language: javascript
Add Flavor Access To Tenant
===========================
.. rest_method:: POST /v2.1/{tenant_id}/flavors/os-flavor-access/{flavor_id}/action
Adds flavor access to a tenant and flavor.
Specify the ``addTenantAccess`` action and the ``tenant_id`` in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
**Example Add Flavor Access To Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-access/flavor-access-add-req.json
:language: javascript
Response
^^^^^^^^
**Example Add Flavor Access To Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-access/flavor-access-add-resp.json
:language: javascript
Remove Flavor Access From Tenant
================================
.. rest_method:: POST /v2.1/{tenant_id}/flavors/os-flavor-access/{flavor_id}/action
Removes flavor access from a tenant and flavor.
Specify the ``removeTenantAccess`` action and the ``tenant_id`` in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
**Example Remove Flavor Access From Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-access/flavor-access-remove-req.json
:language: javascript
Response
^^^^^^^^
**Example Remove Flavor Access From Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-access/flavor-access-remove-resp.json
:language: javascript

View File

@@ -0,0 +1,162 @@
.. -*- rst -*-
======================================================
Flavors extra-specs (flavors, os-flavor-extra-specs)
======================================================
Lists, creates, deletes, and updates the extra-specs or keys for a
flavor.
Create Extra Specs For A Flavor
===============================
.. rest_method:: POST /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs
Creates extra specs for a flavor, by ID.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
**Example Create Extra Specs For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Extra Specs For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-create-resp.json
:language: javascript
List Extra Specs For A Flavor
=============================
.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs
Lists all extra specs for a flavor, by ID.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
**Example List Extra Specs For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-create-req.json
:language: javascript
Response
^^^^^^^^
**Example List Extra Specs For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-specs-list-resp.json
:language: javascript
Show An Extra Spec For A Flavor
===============================
.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
Shows an extra spec, by key, for a flavor, by ID.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
- flavor_extra_spec_key: flavor_extra_spec_key
Response
^^^^^^^^
**Example Show An Extra Spec For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-show-resp.json
:language: javascript
Update An Extra Spec For A Flavor
=================================
.. rest_method:: PUT /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
Updates an extra spec, by key, for a flavor, by ID.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
- flavor_extra_spec_key: flavor_extra_spec_key
**Example Update An Extra Spec For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-update-req.json
:language: javascript
Response
^^^^^^^^
**Example Update An Extra Spec For A Flavor: JSON request**
.. literalinclude:: ../../doc/api_samples/os-flavor-extra-specs/flavor-extra-spec-update-resp.json
:language: javascript
Delete An Extra Spec For A Flavor
=================================
.. rest_method:: DELETE /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
Deletes an extra spec, by key, for a flavor, by ID.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- flavor_id: flavor_id
- flavor_extra_spec_key: flavor_extra_spec_key
Response
^^^^^^^^

View File

@@ -0,0 +1,208 @@
.. -*- rst -*-
==============================================
Floating IP DNS records (os-floating-ip-dns)
==============================================
Manages DNS records associated with floating IP addresses. The API
dispatches requests to a DNS driver that is selected at startup.
List Dns Domains
================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ip-dns
Lists registered DNS domains published by the DNS drivers.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Dns Domains: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-domains-list-resp.json
:language: javascript
Create Or Update Dns Domain
===========================
.. rest_method:: PUT /v2.1/{tenant_id}/os-floating-ip-dns/{domain}
Creates or updates a DNS domain.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
**Example Create Or Update Dns Domain: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-create-or-update-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Update Dns Domain: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-create-or-update-resp.json
:language: javascript
Delete Dns Domain
=================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-floating-ip-dns/{domain}
Deletes a DNS domain and all associated host entries.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
Response
^^^^^^^^
Create Or Update Dns Entry
==========================
.. rest_method:: PUT /v2.1/{tenant_id}/os-floating-ip-dns/{domain}/entries/{name}
Creates or updates a DNS entry.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
- name: name
**Example Create Or Update Dns Entry: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-create-or-update-entry-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Update Dns Entry: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-create-or-update-entry-resp.json
:language: javascript
Find Unique Dns Entry
=====================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ip-dns/{domain}/entries/{name}
Finds a unique DNS entry for a domain and name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
- name: name
Response
^^^^^^^^
**Example Find Unique Dns Entry: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-entry-show-resp.json
:language: javascript
Delete Dns Entry
================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-floating-ip-dns/{domain}/entries/{name}
Deletes a DNS entry.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
- name: name
Response
^^^^^^^^
List Dns Entries
================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ip-dns/{domain}/entries/{ip}
Lists DNS entries for a domain and IP.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- domain: domain
- ip: ip
Response
^^^^^^^^
**Example List Dns Entries: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-dns/floating-ip-dns-entry-by-ip-show-resp.json
:language: javascript

View File

@@ -0,0 +1,42 @@
.. -*- rst -*-
==========================================
Floating IP pools (os-floating-ip-pools)
==========================================
Manages groups of floating IPs.
List Floating Ip Pools
======================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ip-pools
Lists floating IP pools.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- floating_ip_pools: floating_ip_pools
- name: name
**Example List Floating Ip Pools: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ip-pools/floatingippools-list-resp.json
:language: javascript

View File

@@ -0,0 +1,132 @@
.. -*- rst -*-
==========================================
Floating IPs bulk (os-floating-ips-bulk)
==========================================
(nova-network only) Bulk-creates, deletes, and lists floating IPs.
Default pool name is ``nova``.
To view available pools, use the ``os-floating-ip-pools`` extension.
List Floating Ips
=================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ips-bulk
Lists all floating IPs.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Floating Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-list-resp.json
:language: javascript
Create Floating Ips
===================
.. rest_method:: POST /v2.1/{tenant_id}/os-floating-ips-bulk
Bulk-creates floating IPs.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- ip_range: ip_range
**Example Create Floating Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Floating Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-create-resp.json
:language: javascript
Bulk-Delete Floating Ips
========================
.. rest_method:: POST /v2.1/{tenant_id}/os-floating-ips-bulk/delete
Bulk-deletes floating IPs.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- ip_range: ip_range
**Example Bulk-Delete Floating Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-delete-req.json
:language: javascript
Response
^^^^^^^^
**Example Bulk-Delete Floating Ips: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-delete-resp.json
:language: javascript
List Floating Ips By Host
=========================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ips-bulk/{host_name}
Lists all floating IPs for a host.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
Response
^^^^^^^^
**Example List Floating Ips By Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips-bulk/floating-ips-bulk-list-by-host-resp.json
:language: javascript

View File

@@ -0,0 +1,152 @@
.. -*- rst -*-
================================
Floating IPs (os-floating-ips)
================================
Lists floating IP addresses for a project. Also, creates (allocates) a
floating IP address for a project, shows floating IP address details,
and deletes (deallocates) a floating IP address from a project.
The cloud administrator configures a pool of floating IP addresses in
OpenStack Compute. The project quota defines the maximum number of
floating IP addresses that you can allocate to the project. After you
`allocate a floating IP
address <http://developer.openstack.org/api-ref-compute-v2.1.html#createFloatingIP>`__
for a project, you can:
- `Add (associate) the floating IP
address <http://developer.openstack.org/api-ref-compute-v2.1.html#addFloatingIp>`__
with an instance in the project. You can associate only one floating
IP address with an instance at a time.
- `Remove (disassociate) the floating IP
address <http://developer.openstack.org/api-ref-compute-v2.1.html#removeFloatingIp>`__
from an instance in the project.
- Delete, or deallocate, a floating IP from the project, which
automatically deletes any associations for that IP address.
List Floating Ip Addresses
==========================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ips
Lists floating IP addresses associated with the tenant or account.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Floating Ip Addresses: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ips-list-resp.json
:language: javascript
Create (Allocate) Floating Ip Address
=====================================
.. rest_method:: POST /v2.1/{tenant_id}/os-floating-ips
Creates, or allocates, a floating IP address for the current project. By default, the floating IP address is allocated from the public pool.
If more than one floating IP address pool is available, use the ``pool`` parameter to specify from which pool to allocate the IP address.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- pool: pool
**Example Create (Allocate) Floating Ip Address: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ip-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create (Allocate) Floating Ip Address: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ip-create-resp.json
:language: javascript
Show Floating Ip Address Details
================================
.. rest_method:: GET /v2.1/{tenant_id}/os-floating-ips/{floating_ip_id}
Shows details for a floating IP address, by ID, that is associated with the tenant or account.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- floating_ip_id: floating_ip_id
Response
^^^^^^^^
**Example Show Floating Ip Address Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-floating-ips/floating-ip-show-resp.json
:language: javascript
Delete (Deallocate) Floating Ip Address
=======================================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-floating-ips/{floating_ip_id}
Deletes, or deallocates, a floating IP address from the current project and returns it to the pool from which it was allocated.
If the IP address is still associated with a running instance, it is automatically disassociated from that instance.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- floating_ip_id: floating_ip_id
Response
^^^^^^^^

View File

@@ -0,0 +1,80 @@
.. -*- rst -*-
===========================
Ping instances (os-fping)
===========================
Pings instances and reports which ones are alive.
Ping Instances
==============
.. rest_method:: GET /v2.1/{tenant_id}/os-fping
Run the fping utility to ping instances and report which ones are alive.
Specify the ``all_tenants=1`` query parameter to ping instances for all tenants. For example:
GET /os-fping?all_tenants=1Specify the ``include`` and ``exclude`` query parameters to filter the results. For example:
GET /os-fping?all_tenants=1&include=uuid1,uuid2&exclude=uuid3,uuid4Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- all_tenants: all_tenants
- include: include
- exclude: exclude
Response
^^^^^^^^
**Example Ping Instances: JSON request**
.. literalinclude:: ../../doc/api_samples/os-fping/fping-instances-list-resp.json
:language: javascript
Ping An Instance
================
.. rest_method:: GET /v2.1/{tenant_id}/os-fping/{instance_id}
Run the fping utility to ping an instance and report whether it is alive.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- instance_id: instance_id
Response
^^^^^^^^
**Example Ping An Instance: JSON request**
.. literalinclude:: ../../doc/api_samples/os-fping/fping-instance-show-resp.json
:language: javascript

182
api-ref/source/os-hosts.inc Normal file
View File

@@ -0,0 +1,182 @@
.. -*- rst -*-
==================
Hosts (os-hosts)
==================
Manages physical hosts. Some virt drivers don not support all host
functions. For more information, see `nova virt support
matrix <http://docs.openstack.org/developer/nova/support-matrix.html>`__
List Hosts
==========
.. rest_method:: GET /v2.1/{tenant_id}/os-hosts
Lists hosts.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Hosts: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/hosts-list-resp.json
:language: javascript
Enable Host
===========
.. rest_method:: PUT /v2.1/{tenant_id}/os-hosts/{host_name}
Enables or puts a host in maintenance mode.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
**Example Enable Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-update-maintenance-req.json
:language: javascript
Response
^^^^^^^^
**Example Enable Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-update-maintenance-resp.json
:language: javascript
Show Host Details
=================
.. rest_method:: GET /v2.1/{tenant_id}/os-hosts/{host_name}
Shows details for a host.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
Response
^^^^^^^^
**Example Show Host Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-show-resp.json
:language: javascript
Reboot Host
===========
.. rest_method:: GET /v2.1/{tenant_id}/os-hosts/{host_name}/reboot
Reboots a host.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
Response
^^^^^^^^
**Example Reboot Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-reboot-resp.json
:language: javascript
Shut Down Host
==============
.. rest_method:: GET /v2.1/{tenant_id}/os-hosts/{host_name}/shutdown
Shuts down a host.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
Response
^^^^^^^^
**Example Shut Down Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-shutdown-resp.json
:language: javascript
Start Host
==========
.. rest_method:: GET /v2.1/{tenant_id}/os-hosts/{host_name}/startup
Starts a host.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host_name: host_name
Response
^^^^^^^^
**Example Start Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hosts/host-start-resp.json
:language: javascript

View File

@@ -0,0 +1,120 @@
.. -*- rst -*-
==============================
Hypervisors (os-hypervisors)
==============================
Lists all hypervisors, shows summary statistics for all hypervisors over
all compute nodes, shows details for a hypervisor, and shows the uptime
for a hypervisor.
List Hypervisors
================
.. rest_method:: GET /v2.1/{tenant_id}/os-hypervisors
Lists hypervisors.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Hypervisors: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisors-list-resp.json
:language: javascript
Show Hypervisor Statistics
==========================
.. rest_method:: GET /v2.1/{tenant_id}/os-hypervisors/statistics
Shows summary statistics for all hypervisors over all compute nodes.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Show Hypervisor Statistics: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisor-statistics-show-resp.json
:language: javascript
Show Hypervisor Details
=======================
.. rest_method:: GET /v2.1/{tenant_id}/os-hypervisors/{hypervisor_id}
Shows details for a hypervisor.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- hypervisor_id: hypervisor_id
Response
^^^^^^^^
**Example Show Hypervisor Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisor-show-resp.json
:language: javascript
Show Hypervisor Uptime
======================
.. rest_method:: GET /v2.1/{tenant_id}/os-hypervisors/{hypervisor_id}/uptime
Shows the uptime for a hypervisor.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- hypervisor_id: hypervisor_id
Response
^^^^^^^^
**Example Show Hypervisor Uptime: JSON request**
.. literalinclude:: ../../doc/api_samples/os-hypervisors/hypervisor-uptime-show-resp.json
:language: javascript

View File

@@ -0,0 +1,68 @@
.. -*- rst -*-
=======================================================
Servers - list actions (servers, os-instance-actions)
=======================================================
All users can list available actions for a server.
All users can show details for a server action; however, only
administrators can view server events in server action details.
List Actions For Server
=======================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-instance-actions
Lists actions for a server.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example List Actions For Server: JSON request**
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-actions-list-resp.json
:language: javascript
Show Server Action Details
==========================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-instance-actions/{request_id}
Shows details for a server action.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- request_id: request_id
Response
^^^^^^^^
**Example Show Server Action Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-action-show-resp.json
:language: javascript

View File

@@ -0,0 +1,69 @@
.. -*- rst -*-
========================================================
Instance usage audit log (os-instance-usage-audit-log)
========================================================
Administrator only. Monitors task logs.
List Usage Audits For An Instance
=================================
.. rest_method:: GET /v2.1/{tenant_id}/os-instance_usage_audit_log
Lists usage audits for an instance.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Usage Audits For An Instance: JSON request**
.. literalinclude:: ../../doc/api_samples/os-instance-usage-audit-log/usage-audits-list-resp.json
:language: javascript
List Usage Audits Before Specified Time
=======================================
.. rest_method:: GET /v2.1/{tenant_id}/os-instance_usage_audit_log/{before_timestamp}
Lists usage audits that occurred before a specified time.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- before_timestamp: before_timestamp
Response
^^^^^^^^
**Example List Usage Audits Before Specified Time: JSON request**
.. literalinclude:: ../../doc/api_samples/os-instance-usage-audit-log/usage-audits-log-list-resp.json
:language: javascript

View File

@@ -0,0 +1,146 @@
.. -*- rst -*-
=========================================
Port interfaces (servers, os-interface)
=========================================
Creates a port interface and uses it to attach a port to a server and
detaches a port interface from a server. Also, lists all port interfaces
and shows details for a port interface.
Create Interface
================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/os-interface
Creates a port interface and uses it to attach a port to a server instance.
Normal response codes: 200,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- interfaceAttachment: interfaceAttachment
- port_id: port_id
- net_id: net_id
- fixed_ips: fixed_ips
**Example Create Interface: JSON request**
.. literalinclude:: ../../doc/api_samples/os-interface/port-interface-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- interfaceAttachment: interfaceAttachment
- fixed_ips: fixed_ips
- mac_addr: mac_addr
- net_id: net_id
- port_id: port_id
- port_state: port_state
**Example Create Interface: JSON request**
.. literalinclude:: ../../doc/api_samples/os-interface/port-interface-create-resp.json
:language: javascript
List Port Interfaces
====================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-interface
Lists port interfaces that are attached to a server.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- interfaceAttachment: interfaceAttachment
- port_state: port_state
- fixed_ips: fixed_ips
- mac_addr: mac_addr
- net_id: net_id
- port_id: port_id
**Example List Port Interfaces: JSON request**
.. literalinclude:: ../../doc/api_samples/os-interface/port-interfaces-list-resp.json
:language: javascript
Show Port Interface Details
===========================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-interface/{port_id}
Shows details for a port interface that is attached to a server.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- port_id: port_id
Response
^^^^^^^^
**Example Show Port Interface Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-interface/port-interface-show-resp.json
:language: javascript
Detach Interface
================
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/os-interface/{port_id}
Detaches a port interface.
Normal response codes: 202,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- port_id: port_id
Response
^^^^^^^^

View File

@@ -0,0 +1,120 @@
.. -*- rst -*-
=====================
Keypairs (keypairs)
=====================
Generates, imports, and deletes SSH keys.
List Keypairs
=============
.. rest_method:: GET /v2.1/{tenant_id}/os-keypairs
Lists keypairs that are associated with the account.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Keypairs: JSON request**
.. literalinclude:: ../../doc/api_samples/os-keypairs/keypairs-list-resp.json
:language: javascript
Create Or Import Keypair
========================
.. rest_method:: POST /v2.1/{tenant_id}/os-keypairs
Generates or imports a keypair.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- name: name
- public_key: public_key
**Example Create Or Import Keypair: JSON request**
.. literalinclude:: ../../doc/api_samples/os-keypairs/keypair-import-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Or Import Keypair: JSON request**
.. literalinclude:: ../../doc/api_samples/os-keypairs/keypair-import-resp.json
:language: javascript
Delete Keypair
==============
.. rest_method:: DELETE /v2.1/{tenant_id}/os-keypairs/{keypair_name}
Deletes a keypair.
Normal response codes: 204
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- keypair_name: keypair_name
Response
^^^^^^^^
Show Keypair Details
====================
.. rest_method:: GET /v2.1/{tenant_id}/os-keypairs/{keypair_name}
Shows details for a keypair that is associated with the account.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- keypair_name: keypair_name
Response
^^^^^^^^
**Example Show Keypair Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-keypairs/keypair-show-resp.json
:language: javascript

View File

@@ -0,0 +1,37 @@
.. -*- rst -*-
============================
Migrations (os-migrations)
============================
Shows data on migrations.
List Migrations
===============
.. rest_method:: GET /v2.1/{tenant_id}/os-migrations
Lists in-progress migrations.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Migrations: JSON request**
.. literalinclude:: ../../doc/api_samples/os-migrations/migrations-list-resp.json
:language: javascript

View File

@@ -0,0 +1,280 @@
.. -*- rst -*-
========================
Networks (os-networks)
========================
Creates, lists, shows information for, and deletes networks.
Adds network to a project, disassociates a network from a project, and
disassociates a project from a network.
Associates host with and disassociates host from a network.
Create Network
==============
.. rest_method:: POST /v2.1/{tenant_id}/os-networks
Creates a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Create Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-create-resp.json
:language: javascript
List Networks
=============
.. rest_method:: GET /v2.1/{tenant_id}/os-networks
Lists networks for the project.
Policy defaults enable all users to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Networks: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/networks-list-resp.json
:language: javascript
Add Network
===========
.. rest_method:: POST /v2.1/{tenant_id}/os-networks/add
Adds a network to a project.
Policy defaults enable only users with the administrative role to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Add Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-add-req.json
:language: javascript
Response
^^^^^^^^
Show Network Details
====================
.. rest_method:: GET /v2.1/{tenant_id}/os-networks/{network_id}
Shows details for a network.
Policy defaults enable all users to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
Response
^^^^^^^^
**Example Show Network Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-show-resp.json
:language: javascript
Delete Network
==============
.. rest_method:: DELETE /v2.1/{tenant_id}/os-networks/{network_id}
Deletes a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
Response
^^^^^^^^
Associate Host
==============
.. rest_method:: POST /v2.1/{tenant_id}/os-networks/{network_id}/action
Associates a network with a host.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Associate Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-associate-host-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Host
=================
.. rest_method:: POST /v2.1/{tenant_id}/os-networks/{network_id}/action
Disassociates a host from a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-host-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Network
====================
.. rest_method:: POST /v2.1/{tenant_id}/os-networks/{network_id}/action
Disassociates a network from a project. You can then reuse the network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Project
====================
.. rest_method:: POST /v2.1/{tenant_id}/os-networks/{network_id}/action
Disassociates a project from a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Project: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-project-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,224 @@
.. -*- rst -*-
============================
Quota sets (os-quota-sets)
============================
Permits administrators, depending on policy settings, to view default
quotas, view details for quotas, revert quotas to defaults, and update
the quotas for a project or a project and user.
Update Quotas
=============
.. rest_method:: PUT /v2.1/{admin_tenant_id}/os-quota-sets/{tenant_id}
Update the quotas for a project or a project and a user.
You can force the update even if the quota has already been used and the reserved quota exceeds the new quota.
To force the update, specify the ``"force": "True"`` attribute in the request body. Default is ``false``. The following example request shows the optional ``force`` attribute.
To update a quota for a project and a user, specify the ``user_id`` query parameter.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- admin_tenant_id: admin_tenant_id
- tenant_id: tenant_id
- quota_set: quota_set
- force: force
- cores: cores
- fixed_ips: fixed_ips
- floating_ips: floating_ips
- id: id
- injected_file_content_bytes: injected_file_content_bytes
- injected_file_path_bytes: injected_file_path_bytes
- injected_files: injected_files
- instances: instances
- key_pairs: key_pairs
- metadata_items: metadata_items
- ram: ram
- security_group_rules: security_group_rules
- security_groups: security_groups
- server_groups: server_groups
- server_group_members: server_group_members
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- user_id: user_id
**Example Update Quotas: JSON request**
.. literalinclude:: ../../doc/api_samples/os-quota-sets/quota-update-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- floating_ips: floating_ips
- id: id
- injected_file_content_bytes: injected_file_content_bytes
- injected_file_path_bytes: injected_file_path_bytes
- injected_files: injected_files
- instances: instances
- key_pairs: key_pairs
- metadata_items: metadata_items
- ram: ram
- security_group_rules: security_group_rules
- security_groups: security_groups
- server_groups: server_groups
- server_group_members: server_group_members
**Example Update Quotas: JSON request**
.. literalinclude:: ../../doc/api_samples/os-quota-sets/quota-update-resp.json
:language: javascript
Revert Quotas To Defaults
=========================
.. rest_method:: DELETE /v2.1/{admin_tenant_id}/os-quota-sets/{tenant_id}
Reverts the quotas to default values for a project or a project and a user.
To revert quotas for a project and a user, specify the ``user_id`` query parameter.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- admin_tenant_id: admin_tenant_id
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- user_id: user_id
Response
^^^^^^^^
Show A Quota
============
.. rest_method:: GET /v2.1/{admin_tenant_id}/os-quota-sets/{tenant_id}
Show the quota for a project or a project and a user.
In the request URI, you specify both the ID of the administrative project and the ID of the project for which you want to show quota.
To show a quota for a project and a user, specify the ``user_id`` query parameter.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- admin_tenant_id: admin_tenant_id
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- floating_ips: floating_ips
- id: id
- injected_file_content_bytes: injected_file_content_bytes
- injected_file_path_bytes: injected_file_path_bytes
- injected_files: injected_files
- instances: instances
- key_pairs: key_pairs
- metadata_items: metadata_items
- ram: ram
- security_group_rules: security_group_rules
- security_groups: security_groups
- server_groups: server_groups
- server_group_members: server_group_members
**Example Show A Quota: JSON request**
.. literalinclude:: ../../doc/api_samples/os-quota-sets/user-quotas-show-get-.json
:language: javascript
List Default Quotas For Tenant
==============================
.. rest_method:: GET /v2.1/{admin_tenant_id}/os-quota-sets/{tenant_id}/defaults
Lists the default quotas for a project.
In the request URI, you specify both the ID of the administrative project and the ID of the project for which you want to show default quotas. These project IDs can match.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- admin_tenant_id: admin_tenant_id
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- floating_ips: floating_ips
- id: id
- injected_file_content_bytes: injected_file_content_bytes
- injected_file_path_bytes: injected_file_path_bytes
- injected_files: injected_files
- instances: instances
- key_pairs: key_pairs
- metadata_items: metadata_items
- ram: ram
- security_group_rules: security_group_rules
- security_groups: security_groups
- server_groups: server_groups
- server_group_members: server_group_members
**Example List Default Quotas For Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-quota-sets/quotas-default-list-resp.json
:language: javascript

View File

@@ -0,0 +1,152 @@
.. -*- rst -*-
====================================================================
Rules for default security group (os-security-group-default-rules)
====================================================================
Lists, shows information for, and creates default security group rules.
List Default Security Group Rules
=================================
.. rest_method:: GET /v2.1/{tenant_id}/os-security-group-default-rules
Lists default security group rules.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- from_port: from_port
- id: id
- ip_protocol: ip_protocol
- ip_range: ip_range
- cidr: cidr
- to_port: to_port
**Example List default security group rules: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-group-default-rules/security-group-default-rules-list-resp.json
:language: javascript
Create Default Security Group Rule
==================================
.. rest_method:: POST /v2.1/{tenant_id}/os-security-group-default-rules
Creates a default security group rule.
If you specify a source port ( ``from_port`` ) or destination port ( ``to_port`` ) value, you must specify an IP protocol ( ``ip_protocol`` ) value. Otherwise, the operation returns the ``Bad Request (400)`` response code.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- id: id
- ip_protocol: ip_protocol
- from_port: from_port
- to_port: to_port
- cidr: cidr
**Example Create default security group rule: JSON request**
.. literalinclude:: ../../doc/api_samples/os-security-group-default-rules/security-group-default-rule-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- from_port: from_port
- id: id
- ip_protocol: ip_protocol
- ip_range: ip_range
- cidr: cidr
- to_port: to_port
**Example Create default security group rule: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-group-default-rules/security-group-default-rule-create-resp.json
:language: javascript
Show Default Security Group Rule Details
========================================
.. rest_method:: GET /v2.1/{tenant_id}/os-security-group-default-rules/{security_group_default_rule_id}
Shows details for a security group rule.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_default_rule_id: security_group_default_rule_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- from_port: from_port
- id: id
- ip_protocol: ip_protocol
- ip_range: ip_range
- cidr: cidr
- to_port: to_port
**Example Show default security group rule: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-group-default-rules/security-group-default-rule-show-resp.json
:language: javascript
Delete Default Security Group Rule
==================================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-security-group-default-rules/{security_group_default_rule_id}
Deletes a security group rule.
Normal response codes: 204,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_default_rule_id: security_group_default_rule_id
Response
^^^^^^^^

View File

@@ -0,0 +1,83 @@
.. -*- rst -*-
====================================================
Rules for security group (os-security-group-rules)
====================================================
Creates and deletes security group rules.
Create Security Group Rule
==========================
.. rest_method:: POST /v2.1/{tenant_id}/os-security-group-rules
Creates a rule for a security group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_rule: security_group_rule
- parent_group_id: parent_group_id
- ip_protocol: ip_protocol
- from_port: from_port
- to_port: to_port
- cidr: cidr
- group_id: group_id
**Example Create security group rule: JSON request**
.. literalinclude:: ../../doc/api_samples/os-security-group-rules/security-group-rule-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_group_rule: security_group_rule
- ip_protocol: ip_protocol
- from_port: from_port
- to_port: to_port
- ip_range: ip_range
- cidr: cidr
- id: id
- group: group
- parent_group_id: parent_group_id
- name: name
**Example Create security group rule: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-group-rules/security-group-rule-create-resp.json
:language: javascript
Delete Security Group Rule
==========================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-security-group-rules/{security_group_rule_id}
Deletes a security group rule.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_rule_id: security_group_rule_id
Response
^^^^^^^^

View File

@@ -0,0 +1,229 @@
.. -*- rst -*-
======================================
Security groups (os-security-groups)
======================================
Lists, shows information for, creates, and deletes security groups.
List Security Groups
====================
.. rest_method:: GET /v2.1/{tenant_id}/os-security-groups
Lists security groups.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_groups: security_groups
- description: description
- id: id
- name: name
- rules: rules
- tenant_id: tenant_id
**Example List security groups: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-list-resp.json
:language: javascript
Create Security Group
=====================
.. rest_method:: POST /v2.1/{tenant_id}/os-security-groups
Creates a security group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group: security_group
- name: name
- description: description
**Example Create security group: JSON request**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_group: security_group
- description: description
- id: id
- name: name
- rules: rules
- tenant_id: tenant_id
**Example Create security group: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-create-resp.json
:language: javascript
Show Security Group Details
===========================
.. rest_method:: GET /v2.1/{tenant_id}/os-security-groups/{security_group_id}
Shows details for a security group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_id: security_group_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_group: security_group
- description: description
- id: id
- name: name
- rules: rules
- tenant_id: tenant_id
**Example Show security group: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-show-resp.json
:language: javascript
Update Security Group
=====================
.. rest_method:: PUT /v2.1/{tenant_id}/os-security-groups/{security_group_id}
Updates a security group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_id: security_group_id
- name: name
- description: description
**Example Update security group: JSON request**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-update-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_group: security_group
- description: description
- id: id
- name: name
- rules: rules
- tenant_id: tenant_id
**Example Update security group: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-update-resp.json
:language: javascript
Delete Security Group
=====================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-security-groups/{security_group_id}
Deletes a security group.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_group_id: security_group_id
Response
^^^^^^^^
List Security Groups By Server
==============================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-security-groups
Lists security groups for a server.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- security_groups: security_groups
- description: description
- id: id
- name: name
- rules: rules
- tenant_id: tenant_id
**Example List security groups by server: JSON response**
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-list-resp.json
:language: javascript

View File

@@ -0,0 +1,57 @@
.. -*- rst -*-
====================================================
Create external events (os-server-external-events)
====================================================
Creates one or more external events. The API dispatches each event to a
server instance.
Run Events
==========
.. rest_method:: POST /v2.1/{tenant_id}/os-server-external-events
Creates one or more external events, which the API dispatches to the instance.
You must assign this instance to a host. Otherwise, this call does not dispatch the event to the instance.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- events: events
- name: name
- tag: tag
- server_uuid: server_uuid
- status: status
**Example Run Events: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-external-events/event-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- events: events
- code: code
- name: name
- server_uuid: server_uuid
- status: status
- tag: tag
**Example Run Events: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-external-events/event-create-resp.json
:language: javascript

View File

@@ -0,0 +1,162 @@
.. -*- rst -*-
==================================
Server groups (os-server-groups)
==================================
Lists, shows information for, creates, and deletes server groups.
List Server Groups
==================
.. rest_method:: GET /v2.1/{tenant_id}/os-server-groups
Lists all server groups for the tenant.
Administrative users can use the ``all_projects`` query parameter to list all server groups for all projects.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- all_projects: all_projects
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server_groups: server_groups
- id: id
- name: name
- policies: policies
- members: members
- metadata: metadata
- project_id: project_id
- user_id: user_id
**Example List Server Groups: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-groups/server-groups-list-resp.json
:language: javascript
Create Server Group
===================
.. rest_method:: POST /v2.1/{tenant_id}/os-server-groups
Creates a server group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- name: name
- policies: policies
**Example Create Server Group: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-groups/server-group-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server_groups: server_groups
- id: id
- name: name
- policies: policies
- members: members
- metadata: metadata
- project_id: project_id
- user_id: user_id
**Example Create Server Group: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-groups/server-group-create-resp.json
:language: javascript
Show Server Group Details
=========================
.. rest_method:: GET /v2.1/{tenant_id}/os-server-groups/{server_group_id}
Shows details for a server group.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_group_id: server_group_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server_groups: server_groups
- id: id
- name: name
- policies: policies
- members: members
- metadata: metadata
- project_id: project_id
- user_id: user_id
**Example Show Server Group Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-groups/server-group-show-resp.json
:language: javascript
Delete Server Group
===================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-server-groups/{server_group_id}
Deletes a server group.
Normal response codes: 204,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_group_id: server_group_id
Response
^^^^^^^^

View File

@@ -0,0 +1,69 @@
.. -*- rst -*-
================================================
Servers password (servers, os-server-password)
================================================
Shows the encrypted administrative password. Also, clears the encrypted
administrative password for a server, which removes it from the metadata
server.
Show Server Password
====================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-server-password
Shows the administrative password for a server.
This operation calls the metadata service to query metadata information and does not read password information from the server itself.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
**Example Show Server Password: JSON request**
.. literalinclude:: ../../doc/api_samples/os-server-password/password-show-resp.json
:language: javascript
Clear Admin Password
====================
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/os-server-password
Clears the encrypted administrative password for a server, which removes it from the metadata server.
This action does not actually change the instance server password.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 204
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^

View File

@@ -0,0 +1,218 @@
.. -*- rst -*-
================================
Compute services (os-services)
================================
Lists all running Compute services for a tenant, enables or disables
scheduling for a Compute service, logs disabled Compute service
information, and deletes a Compute service.
For an overview of Compute services, see `OpenStack
Compute <http://docs.openstack.org/liberty/install-guide-obs/common/get_started_compute.html>`__.
List Compute Services
=====================
.. rest_method:: GET /v2.1/{tenant_id}/os-services
Lists all running Compute services for a tenant.
Includes reasons, if available, for why any services were disabled.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- services: services
- id: id
- binary: binary
- disabled_reason: disabled_reason
- host: host
- state: state
- status: status
- updated_at: updated_at
- forced_down: forced_down
- zone: zone
**Example List Compute Services: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/services-list-resp.json
:language: javascript
Enable Scheduling For A Compute Service
=======================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/enable
Enables scheduling for a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host: host
- binary: binary
**Example Enable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/service-enable-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- service: service
- binary: binary
- host: host
- status: status
**Example Enable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/service-enable-resp.json
:language: javascript
Disable Scheduling For A Compute Service
========================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/disable
Disables scheduling for a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host: host
- binary: binary
**Example Disable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- service: service
- binary: binary
- host: host
- status: status
**Example Disable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-resp.json
:language: javascript
Log Disabled Compute Service Information
========================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/disable-log-reason
Logs information to the Compute service table about why a Compute service was disabled.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- host: host
- binary: binary
- disabled_reason: disabled_reason
**Example Log Disabled Compute Service Information: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-log-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- service: service
- binary: binary
- disabled_reason: disabled_reason
- host: host
- status: status
**Example Log Disabled Compute Service Information: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-log-resp.json
:language: javascript
Delete Compute Service
======================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-services/{service_id}
Deletes a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 204,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- service_id: service_id
- host: host
- binary: binary
**Example Delete Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-enable-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,62 @@
.. -*- rst -*-
========================================
Usage reports (os-simple-tenant-usage)
========================================
Reports usage statistics on compute and storage resources.
List Tenant Usage For All Tenants
=================================
.. rest_method:: GET /v2.1/{tenant_id}/os-simple-tenant-usage
Lists usage information for all tenants.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Tenant Usage For All Tenants: JSON request**
.. literalinclude:: ../../doc/api_samples/os-simple-tenant-usage/simple-tenant-usage-show-general-resp.json
:language: javascript
Show Usage Details For Tenant
=============================
.. rest_method:: GET /v2.1/{tenant_id}/os-simple-tenant-usage/{tenant_id}
Shows usage details for a tenant.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example Show Usage Details For Tenant: JSON request**
.. literalinclude:: ../../doc/api_samples/os-simple-tenant-usage/simple-tenant-usage-show-resp.json
:language: javascript

View File

@@ -0,0 +1,246 @@
.. -*- rst -*-
=======================================
Project networks (os-tenant-networks)
=======================================
Creates, lists, shows information for, and deletes project networks.
Create Project Network
======================
.. rest_method:: POST /v2.1/{tenant_id}/os-tenant-networks
Creates a project network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
**Example Create Project Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-tenant-networks/network-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Project Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-tenant-networks/network-create-resp.json
:language: javascript
List Project Networks
=====================
.. rest_method:: GET /v2.1/{tenant_id}/os-tenant-networks
Lists all project networks.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Project Networks: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/networks-list-resp.json
:language: javascript
Show Project Network Details
============================
.. rest_method:: GET /v2.1/{tenant_id}/os-tenant-networks/{network_id}
Shows details for a project network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
Response
^^^^^^^^
**Example Show Project Network Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-tenant-networks/network-show-resp.json
:language: javascript
Delete Project Network
======================
.. rest_method:: DELETE /v2.1/{tenant_id}/os-tenant-networks/{network_id}
Deletes a project network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
Response
^^^^^^^^
Associate Host
==============
.. rest_method:: POST /v2.1/{tenant_id}/os-tenant-networks/{network_id}/action
Associates a network with a host.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Associate Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-associate-host-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Host
=================
.. rest_method:: POST /v2.1/{tenant_id}/os-tenant-networks/{network_id}/action
Disassociates a host from a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Host: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-host-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Network
====================
.. rest_method:: POST /v2.1/{tenant_id}/os-tenant-networks/{network_id}/action
Disassociates a network from a project so that the network can be reused.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Network: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-req.json
:language: javascript
Response
^^^^^^^^
Disassociate Project
====================
.. rest_method:: POST /v2.1/{tenant_id}/os-tenant-networks/{network_id}/action
Disassociates a project from a network.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- network_id: network_id
**Example Disassociate Project: JSON request**
.. literalinclude:: ../../doc/api_samples/os-networks/network-disassociate-project-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,50 @@
.. -*- rst -*-
=============================================================
Servers virtual interfaces (servers, os-virtual-interfaces)
=============================================================
Lists virtual interfaces for a server instance.
List Virtual Interfaces
=======================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-virtual-interfaces
Lists the virtual interfaces for an instance.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Change these permissions through the ``policy.json`` file.
The API v2 returns the network ID in the ``OS-EXT-VIF-NET:net_id`` response attribute.
The API v2.1 base version does not return the network ID.
The API v2.12 microversion returns the network ID in the ``net_id`` response attribute.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- virtual_interfaces: virtual_interfaces
- id: id
- mac_address: mac_address
**Example List Virtual Interfaces: JSON request**
.. literalinclude:: ../../doc/api_samples/os-virtual-interfaces/vifs-list-resp.json
:language: javascript

View File

@@ -0,0 +1,10 @@
.. -*- rst -*-
===================================================================
Servers with volume attachments (servers, os-volume\_attachments)
===================================================================
Attaches volumes that are created through the volume API to server
instances. Also, lists volume attachments for a server instance, shows
details for a volume attachment, and detaches a volume.

View File

@@ -0,0 +1,365 @@
.. -*- rst -*-
=============================================
Volume extension (os-volumes, os-snapshots)
=============================================
Manages volumes and snapshots for use with the Compute API.
List Volumes
============
.. rest_method:: GET /v2.1/{tenant_id}/os-volumes
Lists the volumes associated with the account.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Volumes: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volumes-list-resp.json
:language: javascript
Create Volume
=============
.. rest_method:: POST /v2.1/{tenant_id}/os-volumes
Creates a volume.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume: volume
- display_name: display_name
- display_description: display_description
- size: size
- volume_type: volume_type
- metadata: metadata
- availability_zone: availability_zone
- snapshot_id: snapshot_id
**Example Create Volume: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Volume: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-show-resp.json
:language: javascript
List Volumes With Details
=========================
.. rest_method:: GET /v2.1/{tenant_id}/os-volumes/detail
Lists all volumes with details.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Volumes With Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volumes-list-detail-resp.json
:language: javascript
Show Volume Details
===================
.. rest_method:: GET /v2.1/{tenant_id}/os-volumes/{volume_id}
Shows details for a volume.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id
Response
^^^^^^^^
**Example Show Volume Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-show-resp.json
:language: javascript
Delete Volume
=============
.. rest_method:: DELETE /v2.1/{tenant_id}/os-volumes/{volume_id}
Deletes a volume.
Normal response codes: 202,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id
Response
^^^^^^^^
**Example Delete Volume: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-delete-json-http.txt
:language: javascript
List Volume Types
=================
.. rest_method:: GET /v2.1/{tenant_id}/os-volume-types
Lists volume types.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- volume_types: volume_types
- id: id
- name: name
- extra_specs: extra_specs
**Example List Volume Types: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-types-list-resp.json
:language: javascript
Show Volume Type Details
========================
.. rest_method:: GET /v2.1/{tenant_id}/os-volume-types/{volume_type_id}
Shows details for a volume type.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_type_id: volume_type_id
Response
^^^^^^^^
**Example Show Volume Type Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/volume-type-show-resp.json
:language: javascript
Create Snapshot
===============
.. rest_method:: POST /v2.1/{tenant_id}/os-snapshots
Creates a snapshot.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot: snapshot
**Example Create Snapshot: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshot-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Create Snapshot: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshot-show-resp.json
:language: javascript
List Snapshots
==============
.. rest_method:: GET /v2.1/{tenant_id}/os-snapshots
Lists snapshots.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Snapshots: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshots-list-resp.json
:language: javascript
List Snapshots With Details
===========================
.. rest_method:: GET /v2.1/{tenant_id}/os-snapshots/detail
Lists all snapshots with details.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response
^^^^^^^^
**Example List Snapshots With Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshots-list-resp.json
:language: javascript
Show Snapshot Details
=====================
.. rest_method:: GET /v2.1/{tenant_id}/os-snapshots/{snapshot_id}
Shows details for a snapshot.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response
^^^^^^^^
**Example Show Snapshot Details: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshot-show-resp.json
:language: javascript
Delete Snapshot
===============
.. rest_method:: DELETE /v2.1/{tenant_id}/os-snapshots/{snapshot_id}
Deletes a snapshot from the account.
This operation is asynchronous. You must list snapshots repeatedly to determine whether the snapshot was deleted.
Normal response codes: 202,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response
^^^^^^^^
**Example Delete Snapshot: JSON request**
.. literalinclude:: ../../doc/api_samples/os-volumes/snapshot-delete-json-http.txt
:language: javascript

View File

@@ -0,0 +1,39 @@
.. -*- rst -*-
Show Console Output (Os-Getconsoleoutput Action)
================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Shows console output for a server instance.
Specify the ``os-getConsoleOutput`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-getConsoleOutput: os-getConsoleOutput
- length: length
**Example Get console output: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/os-getConsoleOutput-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Get console output: JSON response**
.. literalinclude:: ../../doc/api_samples/servers-action/os-getConsoleOutput-create-resp.json
:language: javascript

View File

@@ -0,0 +1,37 @@
.. -*- rst -*-
Trigger Crash Dump In Server (Trigger_Crash_Dump Action)
========================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Trigger a crash dump in a server.
Specify the ``trigger_crash_dump`` action in the request body.
When a crash dump is triggered for a virtual server, it causes a system reboot. This action can cause data loss. Also, network connectivity can be lost. Once the server comes back online, you can find a Kernel Crash Dump file in a certain location of the filesystem. For example, for Ubuntu you can find it in the ``/var/crash`` directory.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- trigger_crash_dump: trigger_crash_dump
**Example Trigger crash dump: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/server-action-trigger-crash-.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,68 @@
.. -*- rst -*-
Force-Delete Server (Forcedelete Action)
========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Force-deletes a server before deferred cleanup.
Specify the ``forceDelete`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- forceDelete: forceDelete
**Example Force-Delete Server (Forcedelete Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/force-delete-create-req.json
:language: javascript
Response
^^^^^^^^
Restore Soft-Deleted Instance (Restore Action)
==============================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Restores a previously soft-deleted server instance. You cannot use this method to restore deleted instances.
Specify the ``restore`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- restore: restore
**Example Restore Soft-Deleted Instance (Restore Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/restore-create-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,40 @@
.. -*- rst -*-
Evacuate Server (Evacuate Action)
=================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Evacuates a server from a failed host to a new one.
Specify the ``evacuate`` action in the request body.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- evacuate: evacuate
- host: host
- adminPass: adminPass
**Example Evacuate Server (Evacuate Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/evacuate-req.json
:language: javascript
Response
^^^^^^^^
**Example Evacuate Server (Evacuate Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/evacuate-resp.json
:language: javascript

View File

@@ -0,0 +1,68 @@
.. -*- rst -*-
Add (Associate) Fixed Ip (Addfixedip Action)
============================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Adds a fixed IP address to a server instance, which associates that address with the server. The fixed IP address is retrieved from the network that you specify in the request.
Specify the ``addFixedIp`` action and the network ID in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- addFixedIp: addFixedIp
**Example Add (Associate) Fixed Ip (Addfixedip Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/multinic-add-fixed-ip-req.json
:language: javascript
Response
^^^^^^^^
Remove (Disassociate) Fixed Ip (Removefixedip Action)
=====================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Removes, or disassociates, a fixed IP address from a server.
Specify the ``removeFixedIp`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- removeFixedIp: removeFixedIp
**Example Remove (Disassociate) Fixed Ip (Removefixedip Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/multinic-remove-fixed-ip-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,146 @@
.. -*- rst -*-
Get Rdp Console (Os-Getrdpconsole Action)
=========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Gets an `RDP <https://technet.microsoft.com/en-us/windowsserver/ee236407>`__ console for a server.
Specify the ``os-getRDPConsole`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-getRDPConsole: os-getRDPConsole
**Example Get Rdp Console (Os-Getrdpconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getRDPConsole-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Get Rdp Console (Os-Getrdpconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getRDPConsole-create-resp.json
:language: javascript
Get Serial Console (Os-Getserialconsole Action)
===============================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Gets a serial console for a server.
Specify the ``os-getSerialConsole`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-getSerialConsole: os-getSerialConsole
**Example Get Serial Console (Os-Getserialconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getSerialConsole-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Get Serial Console (Os-Getserialconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getSerialConsole-create-resp.json
:language: javascript
Get Spice Console (Os-Getspiceconsole Action)
=============================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Gets a SPICE console for a server.
Specify the ``os-getSPICEConsole`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-getSPICEConsole: os-getSPICEConsole
**Example Get Spice Console (Os-Getspiceconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getSPICEConsole-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Get Spice Console (Os-Getspiceconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getSPICEConsole-create-resp.json
:language: javascript
Get Vnc Console (Os-Getvncconsole Action)
=========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Gets a VNC console for a server.
Specify the ``os-getVNCConsole`` action in the request body.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-getVNCConsole: os-getVNCConsole
**Example Get Vnc Console (Os-Getvncconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getVNCConsole-create-req.json
:language: javascript
Response
^^^^^^^^
**Example Get Vnc Console (Os-Getvncconsole Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/getVNCConsole-create-resp.json
:language: javascript

View File

@@ -0,0 +1,151 @@
.. -*- rst -*-
Shelve Server (Shelve Action)
=============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Shelves a server.
Specify the ``shelve`` action in the request body.
All associated data and resources are kept but anything still in memory is not retained. To restore a shelved instance, use the ``unshelve`` action. To remove a shelved instance, use the ``shelveOffload`` action.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Preconditions
The server status must be ``ACTIVE``, ``SHUTOFF``, ``PAUSED``, or ``SUSPENDED``.
If the server is locked, you must have administrator privileges to shelve the server.
Asynchronous Postconditions
After you successfully shelve a server, its status changes to ``SHELVED`` and the image status is ``ACTIVE``. The server instance data appears on the compute node that the Compute service manages.
If you boot the server from volumes or set the ``shelved_offload_time`` option to 0, the Compute service automatically deletes the instance on compute nodes and changes the server status to ``SHELVED_OFFLOADED``.
Troubleshooting
If the server status does not change to ``SHELVED`` or ``SHELVED_OFFLOADED``, the shelve operation failed. Ensure that you meet the preconditions and run the request again. If the request fails again, investigate whether another operation is running that causes a race condition.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- shelve: shelve
**Example Shelve server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/shelve-req.json
:language: javascript
Response
^^^^^^^^
Shelf-Offload (Remove) Server (Shelveoffload Action)
====================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Shelf-offloads, or removes, a shelved server.
Specify the ``shelveOffload`` action in the request body.
Data and resource associations are deleted. If an instance is no longer needed, you can remove that instance from the hypervisor to minimize resource usage.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Preconditions
The server status must be ``SHELVED``.
If the server is locked, you must have administrator privileges to shelve-offload the server.
Asynchronous Postconditions
After you successfully shelve-offload a server, its status changes to ``SHELVED_OFFLOADED``. The server instance data appears on the compute node.
Troubleshooting
If the server status does not change to ``SHELVED_OFFLOADED``, the shelve-offload operation failed. Ensure that you meet the preconditions and run the request again. If the request fails again, investigate whether another operation is running that causes a race condition.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- shelveOffload: shelveOffload
**Example Shelve server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/shelveOffload-req.json
:language: javascript
Response
^^^^^^^^
Unshelve (Restore) Shelved Server (Unshelve Action)
===================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Unshelves, or restores, a shelved server.
Specify the ``unshelve`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Preconditions
The server status must be ``SHELVED`` or ``SHELVED_OFFLOADED``.
If the server is locked, you must have administrator privileges to unshelve the server.
Asynchronous Postconditions
After you successfully shelve a server, its status changes to ``ACTIVE``. The server appears on the compute node.
The shelved image is deleted from the list of images returned by an API call.
Troubleshooting
If the server status does not change to ``ACTIVE``, the unshelve operation failed. Ensure that you meet the preconditions and run the request again. If the request fails again, investigate whether another operation is running that causes a race condition.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- unshelve: unshelve
**Example Unshelve server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/unshelve-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,822 @@
.. -*- rst -*-
===========================================
Servers - run an action (servers, action)
===========================================
Enables all users to performs an action on a server. Specify the action
in the request body.
You can associate a fixed or floating IP address with a server instance,
or disassociate a fixed or floating IP address from a server instance.
You can attach a volume to a server.
You can create an image from a server, evacuate a server from a failed
host to a new host, and force-delete a server before deferred cleanup.
You can lock, pause, reboot, rebuild, rescue, resize, resume, confirm
the resize of, revert a pending resize for, shelve, shelf-offload,
unshelve, start, stop, unlock, unpause, and unrescue a server. You can
also change the password of the server and add a security group to or
remove a security group from a server. You can also trigger a crash dump
into a server since Mitaka release.
You can get an RDP, serial, SPICE, or VNC console for a server.
Add (Associate) Floating Ip (Addfloatingip Action)
==================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Adds a floating IP address to a server, which associates that address with the server.
A pool of floating IP addresses, configured by the cloud administrator, is available in OpenStack Compute. The project quota defines the maximum number of floating IP addresses that you can allocate to the project. After you `create (allocate) a floating IPaddress <http://developer.openstack.org/api-ref-compute-v2.1.html#createFloatingIP>`__ for a project, you can associate that address with the server. Specify the ``addFloatingIp`` action in the request body.
If an instance is connected to multiple networks, you can associate a floating IP address with a specific fixed IP address by using the optional ``fixed_address`` parameter.
Preconditions
The server must exist.
You can only add a floating IP address to the server when its status is ``available``.
Normal response codes: 202,409,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- addFloatingIp: addFloatingIp
- address: address
- fixed_address: fixed_address
**Example Add (Associate) Floating Ip (Addfloatingip Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/addFloatingIp-req.json
:language: javascript
Response
^^^^^^^^
Add Security Group To A Server (Addsecuritygroup Action)
========================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Adds a security group to a server.
Specify the ``addSecurityGroup`` action in the request body.
Normal response codes: 202,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- addSecurityGroup: addSecurityGroup
- name: name
**Example Add Security Group To A Server (Addsecuritygroup Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/addSecurityGroup-req.json
:language: javascript
Response
^^^^^^^^
Change Administrative Password (Changepassword Action)
======================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Changes the administrative password for a server.
Specify the ``changePassword`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- changePassword: changePassword
**Example Change Administrative Password (Changepassword Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/changePassword-req.json
:language: javascript
Response
^^^^^^^^
Confirm Resized Server (Confirmresize Action)
=============================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Confirms a pending resize action for a server.
Specify the ``confirmResize`` action in the request body.
After you make this request, you typically must keep polling the server status to determine whether the request succeeded. A successfully confirming resize operation shows a status of ``ACTIVE`` or ``SHUTOFF`` and a migration_status of ``confirmed``. You can also see the resized server in the compute node that OpenStack Compute manages.
Preconditions
You can only confirm the resized server where the status is ``VERIFY_RESIZED``, the vm_status is ``RESIZED``, and the migration_status is ``finished`` or ``confirming``.
If the server is locked, you must have administrator privileges to confirm the server.
Troubleshooting
If the server status remains ``RESIZED``, the request failed. Ensure you meet the preconditions and run the request again. If the request fails again, investigate the compute back end or ask your cloud provider.
Normal response codes: 204,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- confirmResize: confirmResize
**Example Confirm Resized Server (Confirmresize Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/confirmResize-req.json
:language: javascript
Response
^^^^^^^^
Create Image (Createimage Action)
=================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Creates an image from a server.
Specify the ``createImage`` action in the request body.
After you make this request, you typically must keep polling the status of the created image to determine whether the request succeeded.
If the operation succeeds, the created image has a status of ``active`` and the server status returns to the original status. You can also see the new image in the image back end that OpenStack Image service manages.
Preconditions
The server must exist.
You can only create a new image from the server when its status is ``ACTIVE``, ``SHUTOFF``, ``PAUSED``, or ``SUSPENDED``.
The connection to the Image service is valid.
Troubleshooting
If the image status remains uploading or shows another error status, the request failed. Ensure you meet the preconditions and run the request again. If the request fails again, investigate the image back end.
If the server status does not go back to an original server's status, the request failed. Ensure you meet the preconditions, or check if there is another operation that causes race conditions for the server, then run the request again. If the request fails again, investigate the compute back end or ask your cloud provider.
If the request fails due to an error on OpenStack Compute service, the image is purged from the image store that OpenStack Image service manages. Ensure you meet the preconditions and run the request again. If the request fails again, investigate OpenStack Compute service or ask your cloud provider.
Normal response codes: 202,409,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- createImage: createImage
**Example Create Image (Createimage Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/createImage-req.json
:language: javascript
Response
^^^^^^^^
Lock Server (Lock Action)
=========================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Locks a server.
Specify the ``lock`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- lock: lock
**Example Lock Server (Lock Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/lock-req.json
:language: javascript
Response
^^^^^^^^
Pause Server (Pause Action)
===========================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Pauses a server. Changes its status to ``PAUSED``.
Specify the ``pause`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- pause: pause
**Example Pause Server (Pause Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/pause-req.json
:language: javascript
Response
^^^^^^^^
Reboot Server (Reboot Action)
=============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Reboots a server.
Specify the ``reboot`` action in the request body.
Normal response codes: 202,,503,400,401,403,405,404,415,400,422,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- reboot: reboot
**Example Reboot Server (Reboot Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/reboot-req.json
:language: javascript
Response
^^^^^^^^
Rebuild Server (Rebuild Action)
===============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Rebuilds a server.
Specify the ``rebuild`` action in the request body.
To rebuild the server with preservation of the ephemeral partition, set the ``preserve_ephemeral`` parameter to ``true``.
Normal response codes: 202,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- rebuild: rebuild
- imageRef: imageRef
- name: name
- adminPass: adminPass
- metadata: metadata
- personality: personality
- preserve_ephemeral: preserve_ephemeral
**Example Rebuild Server (Rebuild Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/rebuild-preserve-ephemeral-req.json
:language: javascript
Response
^^^^^^^^
**Example Rebuild Server (Rebuild Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/rebuild-resp.json
:language: javascript
Remove (Disassociate) Floating Ip (Removefloatingip Action)
===========================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Removes, or disassociates, a floating IP address from a server.
The IP address is returned to the pool of IP addresses that is available for all projects. When you remove a floating IP address and that IP address is still associated with a running instance, it is automatically disassociated from that instance.
Specify the ``removeFloatingIp`` action in the request body.
Normal response codes: 202,409,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- removeFloatingIp: removeFloatingIp
- address: address
**Example Remove (Disassociate) Floating Ip (Removefloatingip Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/removeFloatingIp-req.json
:language: javascript
Response
^^^^^^^^
Remove Security Group From A Server (Removesecuritygroup Action)
================================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Removes a security group from a server.
Specify the ``removeSecurityGroup`` action in the request body.
Normal response codes: 202,,503,400,401,403,405,415,400
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- removeSecurityGroup: removeSecurityGroup
- name: name
**Example Remove Security Group From A Server (Removesecuritygroup Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/removeSecurityGroup-req.json
:language: javascript
Response
^^^^^^^^
Rescue Server (Rescue Action)
=============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Puts a server in rescue mode and changes its status to ``RESCUE``.
Specify the ``rescue`` action in the request body.
If you specify the ``rescue_image_ref`` extended attribute, the image is used to rescue the instance. If you omit an image reference, the base image reference is used by default.
Asynchronous Postconditions
After you successfully rescue a server and make a ``GET /v2.1/{tenant_id}/servers/{server_id}`` request, its status changes to ``RESCUE``.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- rescue: rescue
- adminPass: adminPass
- rescue_image_ref: rescue_image_ref
**Example Rescue server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/rescue-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- adminPass: adminPass
**Example Extended rescue server: JSON response**
.. literalinclude:: ../../doc/api_samples/servers-action/rescue-resp.json
:language: javascript
Resize Server (Resize Action)
=============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Resizes a server.
Specify the ``resize`` action in the request body.
A successfully resized server shows a ``VERIFY_RESIZE`` status, ``RESIZED`` VM status, and ``finished`` migration status. If you set the ``resize_confirm_window`` option of the Compute service to an integer value, the Compute service automatically confirms the resize operation after the set interval in seconds.
Preconditions
You can only resize a server when its status is ``ACTIVE`` or ``SHUTOFF``.
If the server is locked, you must have administrator privileges to resize the server.
Normal response codes: 202,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- resize: resize
**Example Resize Server (Resize Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/resize-req.json
:language: javascript
Response
^^^^^^^^
Resume Suspended Server (Resume Action)
=======================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Resumes a suspended server and changes its status to ``ACTIVE``.
Specify the ``resume`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- resume: resume
**Example Resume Suspended Server (Resume Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/resume-req.json
:language: javascript
Response
^^^^^^^^
Revert Resized Server (Revertresize Action)
===========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Cancels and reverts a pending resize action for a server.
Specify the ``revertResize`` action in the request body.
After you make this request, you typically must keep polling the server status to determine whether the request succeeded. A successfully reverting resize operation shows a status of ``ACTIVE`` or ``SHUTOFF`` and a migration_status of ``reverted``. You can also see the reverted server in the compute node that OpenStack Compute manages.
Preconditions
You can only confirm the resized server where the status is ``VERIFY_RESIZE`` and the vm_status is ``RESIZED``.
If the server is locked, you must have administrator privileges to revert the resizing.
Troubleshooting
If the server status remains ``RESIZED``, the request failed. Ensure you meet the preconditions and run the request again. If the request fails again, investigate the compute back end.
The server is not reverted in the compute node that OpenStack Compute manages.
Normal response codes: 202,,503,400,401,403,405,404,415,400,503,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- revertResize: revertResize
**Example Revert Resized Server (Revertresize Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/revertResize-req.json
:language: javascript
Response
^^^^^^^^
Start Server (Os-Start Action)
==============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Starts a stopped server and changes its status to ``ACTIVE``.
Specify the ``os-start`` action in the request body.
Preconditions
The server status must be ``SHUTOFF``.
If the server is locked, you must have administrator privileges to start the server.
Asynchronous Postconditions
After you successfully start a server, its status changes to ``ACTIVE``. The server appears on the compute node that the Compute service manages.
Troubleshooting
If the server status does not change to ``ACTIVE``, the start operation failed. Ensure that you meet the preconditions and run the request again. If the request fails again, investigate whether another operation is running that causes a race condition.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-start: os-start
**Example Start server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/start-req.json
:language: javascript
Response
^^^^^^^^
Stop Server (Os-Stop Action)
============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Stops a running server and changes its status to ``SHUTOFF``.
Specify the ``os-stop`` action in the request body.
Preconditions
The server status must be ``ACTIVE`` or ``ERROR``.
If the server is locked, you must have administrator privileges to stop the server.
Asynchronous Postconditions
After you successfully stop a server, its status changes to ``SHUTOFF``. The server instance data appears only on the compute node that Compute service manages.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-stop: os-stop
**Example Stop server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/stop-req.json
:language: javascript
Response
^^^^^^^^
Suspend Server (Suspend Action)
===============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Suspends a server and changes its status to ``SUSPENDED``.
Specify the ``suspend`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- suspend: suspend
**Example Suspend Server (Suspend Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/suspend-req.json
:language: javascript
Response
^^^^^^^^
Unlock Server (Unlock Action)
=============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Unlocks a locked server.
Specify the ``unlock`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- unlock: unlock
**Example Unlock Server (Unlock Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/unlock-req.json
:language: javascript
Response
^^^^^^^^
Unpause Server (Unpause Action)
===============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Unpauses a paused server and changes its status to ``ACTIVE``.
Specify the ``unpause`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- unpause: unpause
**Example Unpause Server (Unpause Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/unpause-req.json
:language: javascript
Response
^^^^^^^^
Unrescue Server (Unrescue Action)
=================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Unrescues a server. Changes status to ``ACTIVE``.
Specify the ``unrescue`` action in the request body.
Preconditions
The server must exist.
You can only unrescue a server when its status is ``RESCUE``.
Asynchronous Postconditions
After you successfully unrescue a server and make a ``GET /v2.1/{tenant_id}/servers/{server_id}`` request, its status changes to ``ACTIVE``.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- unrescue: unrescue
**Example Unrescue server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action/unrescue-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,217 @@
.. -*- rst -*-
==========================================================
Servers - run an administrative action (servers, action)
==========================================================
Enables administrators to perform an action on a server. Specify the
action in the request body.
You can change the administrative password for, create a back up of, and
inject network information into a server.
You can migrate, live-migrate, reset networking on, and reset the state
of a server.
Create Server Back Up (Createbackup Action)
===========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Creates a back up of a server.
Specify the ``createBackup`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- createBackup: createBackup
**Example Create Server Back Up (Createbackup Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/createBackup-req.json
:language: javascript
Response
^^^^^^^^
Inject Network Information (Injectnetworkinfo Action)
=====================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Injects network information into a server.
Specify the ``injectNetworkInfo`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- injectNetworkInfo: injectNetworkInfo
**Example Inject Network Information (Injectnetworkinfo Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/injectNetworkInfo-req.json
:language: javascript
Response
^^^^^^^^
Migrate Server (Migrate Action)
===============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Migrates a server to a host. The scheduler chooses the host.
Specify the ``migrate`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- migrate: migrate
**Example Migrate Server (Migrate Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/migrate-req.json
:language: javascript
Response
^^^^^^^^
Live-Migrate Server (Os-Migratelive Action)
===========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Live-migrates a server to a new host without rebooting.
Use the ``host`` parameter to specify the destination host. If you omit this parameter, the scheduler chooses a host. If a scheduled host is not suitable, the scheduler tries up to ``migrate_max_retries`` rescheduling attempts.
If both source and destination hosts provide local disks, you can set the ``block_migration`` parameter to ``true``. If either host uses shared storage, the migration fails if you set this parameter to ``true``.
Policy defaults enable only users with the administrative role to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- host: host
- block_migration: block_migration
- disk_over_commit: disk_over_commit
**Example Live-Migrate Server (Os-Migratelive Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/os-migrateLive-req.json
:language: javascript
Response
^^^^^^^^
Reset Networking On A Server (Resetnetwork Action)
==================================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Resets networking on a server.
Specify the ``resetNetwork`` action in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- resetNetwork: resetNetwork
**Example Reset Networking On A Server (Resetnetwork Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/resetNetwork-req.json
:language: javascript
Response
^^^^^^^^
Reset Server State (Os-Resetstate Action)
=========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
Resets the state of a server.
Specify the ``os-resetState`` action and the ``state`` in the request body.
Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the ``policy.json`` file.
Normal response codes: 202
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- os-resetState: os-resetState
**Example Reset Server State (Os-Resetstate Action): JSON request**
.. literalinclude:: ../../doc/api_samples/servers-action-admin/os-resetState-req.json
:language: javascript
Response
^^^^^^^^

View File

@@ -0,0 +1,142 @@
.. -*- rst -*-
===================================
Servers multiple create (servers)
===================================
Creates one or more servers.
Optionally, you can set ``"return_reservation_id": "True"`` in the
request body to request that a reservation ID be returned instead of the
newly created instance information. With this parameter, the response
shows only the reservation ID.
Create Multiple Servers
=======================
.. rest_method:: POST /v2.1/{tenant_id}/servers
Creates one or more servers.
Normal response codes: 202,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_groups: security_groups
- user_data: user_data
- os-availability-zone:availability_zone: os-availability-zone:availability_zone
- server: server
- imageRef: imageRef
- flavorRef: flavorRef
- networks: networks
- uuid: uuid
- port: port
- fixed_ip: fixed_ip
- name: name
- metadata: metadata
- personality: personality
- block_device_mapping_v2: block_device_mapping_v2
- device_name: device_name
- source_type: source_type
- destination_type: destination_type
- delete_on_termination: delete_on_termination
- guest_format: guest_format
- boot_index: boot_index
- config_drive: config_drive
- key_name: key_name
- os:scheduler_hints: os:scheduler_hints
- OS-DCF:diskConfig: OS-DCF:diskConfig
- return_reservation_id: return_reservation_id
**Example Create multiple servers without reservation ID**
.. literalinclude:: ../../doc/api_samples/servers-multiple-create/multiple-create-no-resv-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server: server
- adminPass: adminPass
- id: id
- links: links
- OS-DCF:diskConfig: OS-DCF:diskConfig
- security_groups: security_groups
**Example Create multiple servers without reservation ID**
.. literalinclude:: ../../doc/api_samples/servers/server-create-resp.json
:language: javascript
Create Multiple Servers With Reservation Id
===========================================
.. rest_method:: POST /v2.1/{tenant_id}/servers
Creates one or more servers with a reservation ID.
Set ``"return_reservation_id": "True"`` in the request body to request that a reservation ID be returned instead of the newly created instance information. With this parameter, the response shows only the reservation ID.
Normal response codes: 202,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_groups: security_groups
- user_data: user_data
- os-availability-zone:availability_zone: os-availability-zone:availability_zone
- server: server
- imageRef: imageRef
- flavorRef: flavorRef
- networks: networks
- uuid: uuid
- port: port
- fixed_ip: fixed_ip
- name: name
- metadata: metadata
- personality: personality
- block_device_mapping_v2: block_device_mapping_v2
- device_name: device_name
- source_type: source_type
- destination_type: destination_type
- delete_on_termination: delete_on_termination
- guest_format: guest_format
- boot_index: boot_index
- config_drive: config_drive
- key_name: key_name
- os:scheduler_hints: os:scheduler_hints
- OS-DCF:diskConfig: OS-DCF:diskConfig
- return_reservation_id: return_reservation_id
**Example Create multiple servers with reservation ID**
.. literalinclude:: ../../doc/api_samples/servers-multiple-create/multiple-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- reservation_id: reservation_id
**Example Create multiple servers with reservation ID**
.. literalinclude:: ../../doc/api_samples/servers-multiple-create/multiple-create-resp.json
:language: javascript

514
api-ref/source/servers.inc Normal file
View File

@@ -0,0 +1,514 @@
.. -*- rst -*-
===================
Servers (servers)
===================
Lists, creates, shows details for, updates, and deletes servers.
**Passwords**
When you create a server, you can specify a password through the
optional adminPass attribute. The password must meet the complexity
requirements set by your OpenStack Compute provider. The server might
enter an ``ERROR`` state if the complexity requirements are not met. In
this case, a client might issue a change password action to reset the
server password.
If you do not specify a password, the API generates and assigns a random
password that it returns in the response object. This password meets the
security requirements set by the compute provider. For security reasons,
subsequent GET calls do not require this password.
**Server metadata**
You can specify custom server metadata at server launch time. The
maximum size for each metadata key-value pair is 255 bytes. The compute
provider determines the maximum number of key-value pairs for each
server. You can query this value through the ``maxServerMeta`` absolute
limit.
**Server networks**
You can specify one or more networks to which the server connects at
launch time. Users can also specify a specific port on the network or
the fixed IP address to assign to the server interface.
**Note**
You can use both IPv4 and IPv6 addresses as access addresses and you
can assign both addresses simultaneously. You can update access
addresses after you create a server.
**Server personality**
To customize the personality of a server instance, you can inject data
into its file system. For example, you might insert ssh keys, set
configuration files, or store data that you want to retrieve from inside
the instance. This customization method provides minimal launch-time
personalization. If you require significant customization, create a
custom image.
Follow these guidelines when you inject files:
- The maximum size of the file path data is 255 bytes.
- Encode the file contents as a Base64 string. The compute provider
determines the maximum size of the file contents. The image that you
use to create the server determines this value.
**Note**
The maximum limit refers to the number of bytes in the decoded
data and not to the number of characters in the encoded data.
- The ``maxPersonality`` absolute limit defines the maximum number of
file path and content pairs that you can supply. The compute provider
determines this value.
- The ``maxPersonalitySize`` absolute limit is a byte limit that
applies to all images in the deployment. Providers can set additional
per-image personality limits.
The file injection might not occur until after the server builds and
boots.
After file injection, only system administrators can access personality
files. For example, on Linux, all files have root as the owner and the
root group as the group owner, and allow only user and group read access
(``chmod 440``).
**Server access addresses**
In a hybrid environment, the underlying implementation might not control
the IP address of a server. Instead, the access IP address might be part
of the dedicated hardware; for example, a router/NAT device. In this
case, you cannot use the addresses that the implementation provides to
access the server from outside the local LAN. Instead, the API might
assign a separate access address at creation time to provide access to
the server. This address might not be directly bound to a network
interface on the server and might not necessarily appear when you query
the server addresses. However, clients should use an access address to
access the server directly.
Create Server
=============
.. rest_method:: POST /v2.1/{tenant_id}/servers
Creates a server.
The progress of this operation depends on the location of the requested image, network I/O, host load, selected flavor, and other factors.
To check the progress of the request, make a ``GET /servers/{id}`` request. This call returns a progress attribute, which is a percentage value from 0 to 100.
The ``Location`` header returns the full URL to the newly created server and is available as a ``self`` and ``bookmark`` link in the server representation.
When you create a server, the response shows only the server ID, its links, and the admin password. You can get additional attributes through subsequent ``GET`` requests on the server.
Include the ``block-device-mapping-v2`` parameter in the create request body to boot a server from a volume.
Include the ``key_name`` parameter in the create request body to add a keypair to the server when you create it. To create a keypair, make a `create keypair <http://developer.openstack.org/api-ref-compute-v2.1.html#createKeypair>`__ request.
Preconditions
The user must have sufficient server quota to create the number of servers requested.
The connection to the Image service is valid.
Asynchronous postconditions
With correct permissions, you can see the server status as ``ACTIVE`` through API calls.
With correct access, you can see the created server in the compute node that OpenStack Compute manages.
Troubleshooting
If the server status remains ``BUILDING`` or shows another error status, the request failed. Ensure you meet the preconditions then investigate the compute node.
The server is not created in the compute node that OpenStack Compute manages.
The compute node needs enough free resource to match the resource of the server creation request.
Ensure that the scheduler selection filter can fulfill the request with the available compute nodes that match the selection criteria of the filter.
Normal response codes: 202,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- security_groups: security_groups
- user_data: user_data
- os-availability-zone:availability_zone: os-availability-zone:availability_zone
- server: server
- imageRef: imageRef
- flavorRef: flavorRef
- networks: networks
- uuid: uuid
- port: port
- fixed_ip: fixed_ip
- name: name
- metadata: metadata
- personality: personality
- block_device_mapping_v2: block_device_mapping_v2
- device_name: device_name
- source_type: source_type
- destination_type: destination_type
- delete_on_termination: delete_on_termination
- guest_format: guest_format
- boot_index: boot_index
- config_drive: config_drive
- key_name: key_name
- os:scheduler_hints: os:scheduler_hints
- OS-DCF:diskConfig: OS-DCF:diskConfig
**Example Create Server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-create-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server: server
- adminPass: adminPass
- id: id
- links: links
- OS-DCF:diskConfig: OS-DCF:diskConfig
- security_groups: security_groups
**Example Create Server: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-create-resp.json
:language: javascript
List Servers
============
.. rest_method:: GET /v2.1/{tenant_id}/servers
Lists IDs, names, and links for all servers.
Servers contain a status attribute that indicates the current server state. You can filter on the server status when you complete a list servers request. The server status is returned in the response body. The possible server status values are:
Server status values``ACTIVE``. The server is active.
``BUILDING``. The server has not finished the original build process.
``DELETED``. The server is permanently deleted.
``ERROR``. The server is in error.
``HARD_REBOOT``. The server is hard rebooting. This is equivalent to pulling the power plug on a physical server, plugging it back in, and rebooting it.
``MIGRATING``. The server is being migrated to a new host.
``PASSWORD``. The password is being reset on the server.
``PAUSED``. In a paused state, the state of the server is stored in RAM. A paused server continues to run in frozen state.
``REBOOT``. The server is in a soft reboot state. A reboot command was passed to the operating system.
``REBUILD``. The server is currently being rebuilt from an image.
``RESCUED``. The server is in rescue mode. A rescue image is running with the original server image attached.
``RESIZED``. Server is performing the differential copy of data that changed during its initial copy. Server is down for this stage.
``REVERT_RESIZE``. The resize or migration of a server failed for some reason. The destination server is being cleaned up and the original source server is restarting.
``SOFT_DELETED``. The server is marked as deleted but the disk images are still available to restore.
``STOPPED``. The server is powered off and the disk image still persists.
``SUSPENDED``. The server is suspended, either by request or necessity. This status appears for only the XenServer/XCP, KVM, and ESXi hypervisors. Administrative users can suspend an instance if it is infrequently used or to perform system maintenance. When you suspend an instance, its VM state is stored on disk, all memory is written to disk, and the virtual machine is stopped. Suspending an instance is similar to placing a device in hibernation; memory and vCPUs become available to create other instances.
``UNKNOWN``. The state of the server is unknown. Contact your cloud provider.
``VERIFY_RESIZE``. System is awaiting confirmation that the server is operational after a move or resize.
Normal response codes: 200,,503,400,401,403,405
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Query Parameters
~~~~~~~~~~~~~~~~
.. rest_parameters:: parameters.yaml
- changes-since: changes-since
- image: image
- flavor: flavor
- name: name
- status: status
- host: host
- limit: limit
- marker: marker
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- servers: servers
- id: id
- links: links
- name: name
**Example List Servers: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/servers-list-resp.json
:language: javascript
Show Server Details
===================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}
Shows details for a server.
Includes server details including configuration drive, extended status, and server usage information.
The extended status information appears in the ``OS-EXT-STS:vm_state``, ``OS-EXT-STS:power_state``, and ``OS-EXT-STS:task_state`` attributes.
The server usage information appears in the ``OS-SRV-USG:launched_at`` and ``OS-SRV-USG:terminated_at`` attributes.
To hide ``addresses`` information for instances in a certain state, set the ``osapi_hide_server_address_states`` configuration option. Set this option to a valid VM state in the ``nova.conf`` configuration file.
HostId is unique peraccount and is not globally unique.
Preconditions
The server must exist.
Normal response codes: 200,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server: server
- addresses: addresses
- created: created
- flavor: flavor
- hostId: hostId
- id: id
- image: image
- key_name: key_name
- links: links
- metadata: metadata
- name: name
- 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-extended-volumes:volumes_attached: os-extended-volumes:volumes_attached
- 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
- description: description
- id: id
- name: name
- rules: rules
- status: status
- host_status: host_status
- tenant_id: tenant_id
- updated: updated
- user_id: user_id
**Example Show Server Details: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-show-resp.json
:language: javascript
Update Server
=============
.. rest_method:: PUT /v2.1/{tenant_id}/servers/{server_id}
Updates the editable attributes of a server.
Preconditions
The server must exist.
You can edit the ``accessIPv4``, ``accessIPv6``, ``diskConfig`` and ``name`` attributes.
Normal response codes: 200,,503,400,401,403,405,404,409
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
- security_groups: security_groups
- user_data: user_data
- os-availability-zone:availability_zone: os-availability-zone:availability_zone
- server: server
- imageRef: imageRef
- flavorRef: flavorRef
- networks: networks
- uuid: uuid
- port: port
- fixed_ip: fixed_ip
- name: name
- metadata: metadata
- personality: personality
- block_device_mapping_v2: block_device_mapping_v2
- device_name: device_name
- source_type: source_type
- destination_type: destination_type
- delete_on_termination: delete_on_termination
- guest_format: guest_format
- boot_index: boot_index
- config_drive: config_drive
- key_name: key_name
- os:scheduler_hints: os:scheduler_hints
- OS-DCF:diskConfig: OS-DCF:diskConfig
**Example Update server name: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-update-req.json
:language: javascript
**Example Update server IP addresses: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-update-address-req.json
:language: javascript
**Example Update server OS-DCF:diskConfig parameter: JSON request**
.. literalinclude:: ../../doc/api_samples/servers/server-update-diskconfig-req.json
:language: javascript
Response
^^^^^^^^
.. rest_parameters:: parameters.yaml
- server: server
- addresses: addresses
- created: created
- flavor: flavor
- hostId: hostId
- id: id
- image: image
- key_name: key_name
- links: links
- metadata: metadata
- name: name
- 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-extended-volumes:volumes_attached: os-extended-volumes:volumes_attached
- 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
- description: description
- id: id
- name: name
- rules: rules
- status: status
- host_status: host_status
- tenant_id: tenant_id
- updated: updated
- user_id: user_id
**Example Update server name: JSON response**
.. literalinclude:: ../../doc/api_samples/servers/server-update-resp.json
:language: javascript
Delete Server
=============
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}
Deletes a server.
Preconditions
The server must exist.
Anyone can delete a server when the status of the server is not locked and when the policy allows.
If the server is locked, you must have administrator privileges to delete the server.
Asynchronous postconditions
With correct permissions, you can see the server status as ``DELETED`` through API calls.
The port attached to the server is deleted.
The server does not appear in the list servers response.
The server managed by OpenStack Compute is deleted on the compute node.
Troubleshooting
If server status remains in ``deleting`` status or another error status, the request failed. Ensure that you meet the preconditions. Then, investigate the compute back end.
The request returns the HTTP 409 response code when the server is locked even if you have correct permissions. Ensure that you meet the preconditions then investigate the server status.
The server managed by OpenStack Compute is not deleted from the compute node.
Normal response codes: 204,,503,400,401,403,405,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id
Response
^^^^^^^^

View File

@@ -0,0 +1,77 @@
.. -*- rst -*-
============
API Versions
============
Lists information for all API versions.
List Api Versions
=================
.. rest_method:: GET /
Lists information about all Compute API versions.
Normal response codes: 200,300
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
Response
^^^^^^^^
**Example List Api Versions: JSON request**
.. literalinclude:: ../../doc/api_samples/versions/versions-list-resp.json
:language: javascript
Show Api V2.1
=============
.. rest_method:: GET /v2.1
Show information about Compute API v2.1.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
Response
^^^^^^^^
**Example Show Api V2.1: JSON request**
.. literalinclude:: ../../doc/api_samples/versions/versions-v21-show-resp.json
:language: javascript
Show Api V2
===========
.. rest_method:: GET /v2
Show information about Compute API v2.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
^^^^^^^
Response
^^^^^^^^
**Example Show Api V2: JSON request**
.. literalinclude:: ../../doc/api_samples/versions/versions-v2-show-resp.json
:language: javascript