nova/api-ref/source/os-availability-zone.inc
Matt Riedemann 1241e3ec2a Stop using "nova" in API samples when creating a server
The "availability_zone" parameter for server create in the
API reference and the availabilty zone user docs both say
that users should not use the default availability zone (nova)
yet our server create API samples use "nova" which is...bad.

This change fixes the API samples and related tests to use
a fake "us-west" availability zone. For any samples that were
requesting an AZ when creating a server, those are changed from
requesting "nova" to requesting "us-west" and a new
AvailabilityZoneFixture is added to stub out the code used to
validate the requested AZ and what is shown in server detail
responses.

Some unused samples are removed from the os-availability-zone
directory and the API reference and AZ user docs are updated for
formatting and linking to other docs for reference.

Change-Id: I3161157f15f05a3ffaaf1b48e7beb6b3e59c5513
Closes-Bug: #1817963
2019-03-01 10:43:08 -05:00

78 lines
2.0 KiB
ReStructuredText

.. -*- rst -*-
.. _os-availability-zone:
===========================================
Availability zones (os-availability-zone)
===========================================
Lists and gets detailed availability zone information.
An availability zone is created or updated by setting the
availability_zone parameter in the ``create``, ``update``, or
``create or update`` methods of the Host Aggregates API.
See `Host Aggregates
<https://docs.openstack.org/nova/latest/user/aggregates.html>`_
for more details.
Get Availability Zone Information
=================================
.. rest_method:: GET /os-availability-zone
Lists availability zone information.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403)
Response
--------
.. rest_parameters:: parameters.yaml
- availabilityZoneInfo: availability_zone_info
- hosts: hosts.availability_zone_none
- zoneName: OS-EXT-AZ:availability_zone
- zoneState: availability_zone_state
- available: available
|
**Example Get availability zone information**
.. literalinclude:: ../../doc/api_samples/os-availability-zone/availability-zone-list-resp.json
:language: javascript
Get Detailed Availability Zone Information
==========================================
.. rest_method:: GET /os-availability-zone/detail
Gets detailed availability zone information.
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: 200
Error response codes: unauthorized(401), forbidden(403)
Response
--------
.. rest_parameters:: parameters.yaml
- availabilityZoneInfo: availability_zone_info
- hosts: hosts.availability_zone
- zoneName: OS-EXT-AZ:availability_zone
- zoneState: availability_zone_state
- available: available
|
**Example Get detailed availability zone information**
.. literalinclude:: ../../doc/api_samples/os-availability-zone/availability-zone-detail-resp.json
:language: javascript