Commit Graph

907 Commits

Author SHA1 Message Date
Matt Riedemann 214656eff2 api-ref: fix description of os-server-external-events 'events' param
The description on the 'events' parameter for the
POST /os-server-external-events API did not make sense,
so this re-words it.

Change-Id: Iaec80e03a8ab0cd1b34126701bd0754953394e42
2019-04-03 18:08:41 -04:00
Matt Riedemann 3dbb0c4c57 api-ref: document ordering for instance actions and events
Whenever I use the os-instance-actions API I have to look at
the DB API source code to figure out the sort order of the
resulting instanceActions and each action's events, which
is desc(created_at) in both cases (and desc(id) but that should
not matter here since the id is not exposed in the API).

This change mentions the resulting sort order of those fields
in the API reference so I can stop looking at source code.

[1] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5149
[2] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5289

Change-Id: Ib5758bc21296e8b6c041198661c147b8e99d57e5
2019-04-03 18:03:28 -04:00
Matt Riedemann 45cecbb427 Fix JsonFilter query hint examples in docs
The API reference and part of the scheduler filter docs for
the JsonFilter query hint are using invalid json strings
in the examples.

This fixes both invalid locations using the same json string
used in the openstack server create command example in the
scheduler admin docs.

Change-Id: Iaab8608c7ffa6fbbea40a838dd02d8096f632f7a
Closes-Bug: #1821764
2019-03-26 12:05:30 -04:00
Takashi NATSUME f87bf4c6b9 api-ref: Add description for BDM volume_size
Add description of cases that 'block_device_mapping_v2.volume_size`
is required in the "Create Server" (POST /servers) API.

Change-Id: I36f28ca756b908b5fc591cc87f5786a3e217285e
Closes-Bug: #1818310
2019-03-13 16:17:20 +00:00
licanwei 14a6767634 api-ref: typo service.disable_reason
'disable_reason' should be 'disabled_reason'

Change-Id: Ie320d7a7eb675bfdba2c907fd44b99c02974d343
2019-03-05 16:58:13 +08:00
Zuul 482d8c9621 Merge "api-ref: explain aggregate set_metadata semantics" 2019-03-04 13:20:13 +00:00
Matt Riedemann 268190b252 api-ref: explain aggregate set_metadata semantics
This came up as a source of confusion while reviewing
change Ic27195e46502067c87ee9c71a811a3ca3f610b73 because
I thought that the "metadata" key in the
POST /os-aggregates/{aggregate_id}/action (set_metadata)
API was an overwrite of the existing metadata rather than
an update.

The way the Aggregate.update_metadata() method works is that
new entries are added, existing metadata is updated if the
value is not None, otherwise existing entries are removed
if the value is None.

And because of the AggregateAPI.is_safe_to_update_az() method
the special "availability_zone" metadata cannot be unset to None
once it is set. So the only way to remove an AZ is to delete the
aggregate altogether.

This updates the API reference description of the "metadata"
parameter in the "set_metadata" action API.

Change-Id: I6fa9f9691b945b5212b7f951ab0a26b4d3049df9
Related-Bug: #1378904
2019-03-01 12:36:42 -05:00
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
Yongli He 2cc7c0e589 Adds the server group info into show server detail API.
The server-groups UUID add to response of 'GET /servers/{id}',
'PUT /servers/{server_id}" and rebuild API
'POST /servers/{server_id}/action'.

Change-Id: I4a2a584df56ece7beb8b12c0ce9b0e6b30237120
Implements: blueprint show-server-group
Co-authored-by: Gerry Kopec <Gerry.Kopec@windriver.com>
Signed-off-by: Yongli He <yongli.he@intel.com>
2019-02-28 14:22:46 -05:00
Zuul 21c6b2def7 Merge "api-ref: mark os-cells as deprecated" 2019-02-25 18:36:40 +00:00
Matt Riedemann 1c6fdc9aec Add microversion to expose virtual device tags
This change adds a new microversion to expose virtual
device tags for volumes and ports attached to a server.

Implements blueprint expose-virtual-device-tags-in-rest-api

Change-Id: I09420ff7134874dfe4dc399931c7740e81ecc2d0
2019-02-21 13:38:51 +00:00
Zuul b5a9eab559 Merge "API microversion 2.69: Handles Down Cells Documentation" 2019-02-21 00:29:01 +00:00
Surya Seetharaman 833af5c9bf API microversion 2.69: Handles Down Cells Documentation
This patch adds the documentation around the work regarding
handling down cells that was introduced in v2.69.

Related to blueprint handling-down-cell

Change-Id: I78ed924a802307a992ff90e61ae7ff07c2cc39d1
2019-02-20 10:10:50 -08:00
Zuul 3cb10395ac Merge "api-ref: mention policy defaults for aggregates" 2019-02-19 19:35:23 +00:00
Zuul f384b3b765 Merge "api-ref: warn about changing/unsetting AZ name with instances" 2019-02-19 19:19:52 +00:00
Zuul e3c24da89a Merge "API microversion 2.69: Handles Down Cells" 2019-02-17 00:01:31 +00:00
Surya Seetharaman 983abb05d7 API microversion 2.69: Handles Down Cells
This patch introduces a new API microversion which will be
used to alter the responses of ``GET /servers``, ``GET /servers/detail``,
``GET /servers/{server_id}`` and ``GET /os-services`` when a cell is
down to return minimal constructs with missing keys.

Implements blueprint handling-down-cell

Change-Id: Id9f12532897912b39093f63e9286540d9029edeb
2019-02-15 14:39:20 -05:00
Takashi NATSUME a925c8b06d api-ref: Add descriptions for vol-backed snapshots
Add descriptions about the createImage action
in the volume-backed servers case.

Change-Id: Iee81ee4ed6d6bbfa2c17955396d4ff7f36f08017
Closes-Bug: #1799495
2019-02-14 14:15:12 +00:00
Matt Riedemann 3ba8311f6f api-ref: mark os-cells as deprecated
As part of an effort to scrub the nova docs of cells v1
references [1] this moves the os-cells API reference to
be grouped with the other deprecated APIs.

A section title is added, similar to the "Obsolete APIs"
section, for organizational purposes.

It should be noted that the os-cells APIs have not been
formally deprecated by capping them at some maximum
microversion like the other deprecated proxy APIs or
for the nova-network APIs, but cells v1 was deprecated
in Pike [2] and since the os-cells APIs are admin-only,
they can be considered effectively deprecated with the
cells v1 deprecation itself, and when we delete the
cells v1 service code the APIs will also be gone like
the other Obsolete APIs.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-February/002569.html
[2] I1a173f7ce0715e684850e030c358e8175fa8724c

Change-Id: I833d2e8d8857448c2922df488ae9d9b425050ddc
2019-02-13 13:19:06 -05:00
Zuul bff3fd1cdb Merge "API: Remove evacuate/live-migrate 'force' parameter" 2019-02-09 22:55:34 +00:00
Stephen Finucane 36a91936a8 API: Remove evacuate/live-migrate 'force' parameter
Add a new microversion that removes support for the aforementioned
argument, which cannot be adequately guaranteed in the new placement
world.

Change-Id: I2a395aa6eccad75a97fa49e993b0300bdcfc7258
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Implements: blueprint remove-force-flag-from-live-migrate-and-evacuate
APIImpact
2019-02-08 17:05:19 -05:00
Matt Riedemann 0d223da238 api-ref: mention policy defaults for aggregates
Change-Id: I8202e825a7c0870a71a60875a7f42125317ff82b
2019-02-06 16:18:24 -05:00
Matt Riedemann 5dc1ed3c5c api-ref: warn about changing/unsetting AZ name with instances
It is currently possible to rename or unset the availability_zone
metadata value on a host aggregate which can adversely impact
instances that were created in that specific AZ since later
attempts to migrate or unshelve those instances will fail if the
AZ with the original name no longer exists.

This adds a warning to the API reference for updating the AZ
name and also fixes a grammar typo in the 'metadata' response
parameter description.

Change-Id: Ie9d4a1ff1a23827490fe51350c11292c6efc4eb2
Related-Bug: #1378904
2019-02-06 16:11:40 -05:00
Matt Riedemann 46a9d73ad8 api-ref: fix link to flavor extra specs docs
This fixes the link, re-words it a bit, moves it to the main
description (since it applies to PUT also) and drops the note
since we don't need note formatting for linking in reference
material.

Closes-Bug: #1814953

Change-Id: Ia24cda353bdcadf3fe8405aac588e8abf1100608
2019-02-06 14:49:18 -05:00
Takashi NATSUME 442c7c68c2 api-ref: Body verification for the lock action
This patch adds more explanations for the lock action
in the Compute API reference and the Compute API guide.

Change-Id: Iae4a42351d11d5caade9a1a299b06fed862a7da4
Partial-Bug: #1793034
2019-01-17 04:05:50 +00:00
Zuul 920ac6d8e1 Merge "Fix up force live migration completion docs" 2018-12-27 23:37:48 +00:00
Zuul 5c80aeb252 Merge "api-ref: sort parameters for limits, quotas and quota classes" 2018-12-17 16:36:11 +00:00
Matt Riedemann 18fbee57b4 Fix up force live migration completion docs
This change does a few things:

* Links live_migration_completion_timeout to the config
  option guide.

* Links the force complete API reference to the feature support
  matrix to see which drivers support the operation.

* Fixes the server status mentioned in the troubleshooting for
  the force complete API reference (a live migrating server
  status is MIGRATING, not ACTIVE). The same text is copied to the
  abort live migration API reference troubleshooting for
  consistency (and since using the server status is more natural than
  the task_state).

* Links to the admin guide for troubleshooting live migration
  timeouts.

Change-Id: I496d3f4b99e3d7e978c7ecb13ab3b67023fcb919
Closes-Bug: #1808579
2018-12-14 15:13:59 -05:00
Zuul 01cea1a045 Merge "api-ref: Add a description about sort order" 2018-11-12 06:50:27 +00:00
Takashi NATSUME 084ce9b28a api-ref: Add a description about sort order
Add a description about the sort order
in the "List Migrations" (GET /os-migrations) API.

Change-Id: Iaa8e264ca95b69f3c97a6848918862ee22922de1
Closes-Bug: #1801789
2018-11-09 23:56:56 +00:00
liuyamin 8ad11697f9 Fix version details API does not return 200 OK
When use version details api http://ip/compute/v2 to get api details,
it does not return 200 OK, and the return value is empty.

This change is to correct the version details API URL.

Change-Id: I6befb4df6b688ae8c59671781c4e7b338a16462c
Closes-Bug: #1802247
2018-11-08 16:03:33 +08:00
Zuul 88db2f9c0a Merge "Add restrictions on updated_at when getting instance action records" 2018-10-29 04:33:15 +00:00
Zuul 9a201632d3 Merge "Add restrictions on updated_at when getting migrations" 2018-10-27 00:42:54 +00:00
Zuul d223b1298b Merge "api-ref: Remove unnecessary minimum microversion" 2018-10-26 18:31:36 +00:00
Takashi NATSUME 4c531a5b94 api-ref: Add descriptions of error cases
In the following APIs, the 'changes-since' query parameter must be
earlier than or equal to 'changes-before' query parameter
otherwise the API returns 400.

* GET /servers
* GET /servers/detail

Add the description in each parameter.

Change-Id: Ieb26275deac2ddee3768a0fad7f37dc5795fb5c0
2018-10-25 07:46:30 +00:00
Takashi NATSUME 8a0e2a1085 api-ref: Remove unnecessary minimum microversion
A minimum microversion description that is the same as
the microversion the API is newly added is redundant
in parameters. So remove them.

Change-Id: I3e1ca88cac3a52a8b44e26f051a51a6db77a3231
Closes-Bug: #1799893
2018-10-25 16:37:21 +09:00
zhangbailin 3d4a7021db Add restrictions on updated_at when getting instance action records
If ``changes-before`` is less than ``changes-since`` in requested,
there will get empty data when querying in db, so add the limit of
these parameters. If ``changes-before`` < ``changes-since``, will
be returned 400.

Closes-Bug: #1796009
Change-Id: I44546bc9798708a48a250cc3a21bdbcabe2649e1
2018-10-24 11:14:26 -04:00
zhangbailin a3a0068929 Add restrictions on updated_at when getting migrations
If ``changes-before`` is less than ``changes-since`` in requested,
there will get empty data when querying in db, so add the limit of
these parameters. If ``changes-before`` < ``changes-since``, will
be returned 400.

Closes-Bug: #1796008
Change-Id: I2a39ac5a9fe969d383099b4e766c46ad05d9f67c
2018-10-24 11:11:49 -04:00
Matt Riedemann 014cf69415 Fix block_device_mapping_v2 mention in server create API reference
The parameter is "block_device_mapping_v2" with underscores
not dashes.

Change-Id: I10300b5614b6fd91a1992e6e22fb776815206795
2018-10-17 16:14:21 -04:00
Zuul 396156eb13 Merge "Add microversion 2.67 to support volume_type" 2018-10-13 18:46:09 +00:00
zhangbailin c7f4190af2 Add microversion 2.67 to support volume_type
Add a new microversion 2.67 to support specify ``volume_type``
when boot instances.

Part of bp boot-instance-specific-storage-backend
Change-Id: I13102243f7ce36a5d44c1790f3a633703373ebf7
2018-10-12 02:57:58 -04:00
Takashi NATSUME 95d2f3c8e7 api-ref: Remove a description in servers-actions.inc
In the "Servers - run an action (servers, action)" section,
it says that you can attach a volume to a server.
But there are no APIs to attach a volume to a server
in the section.
The API is in the "Servers with volume attachments
(servers, os-volume_attachments)" section.

So remove the description in
the "Servers - run an action (servers, action)" section.

TrivialFix
Change-Id: I0bbfa98385930e21ac12815675851036c9a77621
2018-10-09 09:32:28 +09:00
Takashi NATSUME cfaf8e571f api-ref: Move the evacuate action to admin action
The evacuate action can be performed by administrators only by default.
But there is the description of the evacuate action in
the "Servers - run an action (servers, action)" section.

It should be in the "Servers - run an administrative action
(servers, action)" section.
So move to the description of the evacuate action
into the administrative action section.

Change-Id: Iafdd77c14c702af24dbb3f5a3adecc45b3014c48
Closes-Bug: #1796054
2018-10-04 19:20:22 +09:00
Matt Riedemann 183ba80ec5 api-ref: add 'migrations' param to GET /os-migrations
The response parameter table for the GET /os-migrations
API reference was missing the top level "migrations"
parameter which is the list of migration objects.

While in here, fix the fake "Done" status to "done"
in the sample. There is nothing in nova that uses a
status of "Done". The evacuate operation uses "done".

Change-Id: I1e193237e9aec05395cd2760d96e70db7791409b
2018-09-25 17:06:02 -04:00
Takashi NATSUME f2b2f0e1d4 api-ref: Fix wrong bold decoration
In the 'DELETE /os-floating-ips/{floating_ip_id}' API,
"Error response codes: badRequest(400), unauthorized(401),
forbidden(403)," is bold.
But it should not be bold.
So fix it.

TrivialFix
Change-Id: Ic2d1ae2856406600c9dd3273d21dd2f18e56c1e9
2018-09-25 16:06:57 +09:00
Zuul 2274c08460 Merge "Remove deprecated hide_server_address_states option" 2018-09-21 13:58:57 +00:00
Zuul 1c1a111e5a Merge "Resource retrieving: add changes-before filter" 2018-09-21 11:48:29 +00:00
Matt Riedemann 9b69afd457 Remove deprecated hide_server_address_states option
The hide_server_address_states config option and related
policy rule were deprecated in Queens:

  I6040e8c2b3e132b0dfd09f82ae041b4786a63483

They are now removed in Stein as part of the API extension
merge effort.

Part of blueprint api-extensions-merge-stein

Change-Id: Ib3582038274dedbf524ffcaffe818ff0e751489d
2018-09-19 11:36:44 -04:00
zhangbailin 28c1075b59 Resource retrieving: add changes-before filter
This adds the changes-before filter to the servers,
os-instance-actions and os-migrations APIs for
filtering resources which were last updated before
or equal to the given time. The changes-before filter,
like the changes-since filter, will return deleted
server resources.

Part of bp support-to-query-nova-resources-filter-by-changes-before
Change-Id: If91c179e3823c8b0da744a9363906b0f7b05c326
2018-09-19 09:56:56 -04:00
zhufl aa06c053e6 Fix some typos in nova api ref doc
* returnd
* specifiled
* obejct

Change-Id: I57af28fd3934b036c65e284d40ff27d043cd2431
2018-09-18 15:36:05 +08:00