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
This commit is contained in:
Matt Riedemann
2019-02-27 19:53:34 -05:00
parent 68d4cb44ed
commit 1241e3ec2a
65 changed files with 137 additions and 138 deletions
+2
View File
@@ -1,5 +1,7 @@
.. -*- rst -*-
.. _os-availability-zone:
===========================================
Availability zones (os-availability-zone)
===========================================
+8 -5
View File
@@ -4842,18 +4842,21 @@ os-availability-zone:availability_zone:
want your instance to be built. Typically, an admin user will use
availability zones to arrange OpenStack compute hosts into logical
groups.
An availability zone provides a form of physical isolation and redundancy from
other availability zones. For instance, if some racks in your data center are
on a separate power source, you can put servers in those racks in their own availability
zone. Availability zones can also help separate different classes of hardware. By
segregating resources into availability zones, you can ensure that your application
resources are spread across disparate machines to achieve high availability in
the event of hardware or other failure.
the event of hardware or other failure. See
`Availability Zones (AZs) <https://docs.openstack.org/nova/latest/user/aggregates.html#availability-zones-azs>`_ for more information.
You can list the available availability zones by calling the
os-availability-zone API, but you should avoid using the default
availability zone when booting the instance. In general, the
default availability zone is named ``nova``. This AZ is only shown
when listing the availability zones as an admin.
:ref:`os-availability-zone` API, but you should avoid using the `default
availability zone <https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.default_availability_zone>`_
when creating the server. The default availability zone is named ``nova``.
This AZ is only shown when listing the availability zones as an admin.
in: body
required: false
type: string