17 Commits

Author SHA1 Message Date
Matt Riedemann
c549325bd2 api-ref: mark migration_status parameter as optional
Everything that goes through the volumes view builder
detail() method has a strict is_admin check on returning
the migration_status parameter [1]. This means the
migration_status parameter in the API reference should
be optional since it's admin-only and not always shown.

This fixes the v2 and v3 API references for showing,
creating, updating, resetting the status of, and creating
from a managed volume. As a result, the parameter for a
required migration_status parameter is unused and removed.

Note that there is no strict policy check on the
migration_status request parameter when resetting a volume's
status, but the action itself is admin-only by default
using the volume_extension:volume_admin_actions:reset_status
policy rule.

[1] https://opendev.org/openstack/cinder/src/tag/14.0.0/cinder/api/v2/views/volumes.py#L94

Change-Id: I82308dc1a6aaf039b675a17e19747f11be574209
Closes-Bug: #1828113
2019-05-09 09:31:02 -04:00
whoami-rajat
15d1a00a57 Automate generation of volume actions api-ref samples
This patch adds the following tests:

1) Volume actions
2) Volume manage extensions

Change-Id: I7f27a336a6735f4d346cc47c983dfee55f47f55d
Partially-Implements: blueprint generating-sample-files
2019-02-08 01:13:03 +05:30
whoami-rajat
609412fcd2 Improve/Clean api-ref parameters
The parameters with name like example_1, example_2 ... etc. cause
confusion while updating the api-ref docs like the examples below:

https://review.openstack.org/#/c/609639/
https://review.openstack.org/#/c/609611/

This patch does the following changes :
1) Replace numbering in the parameter with relevant names
2) Clean up unused parameters

Change-Id: I35b343bf068281d729576e5ecc209bda60c28680
2018-11-05 10:47:14 +05:30
zhufl
a065af3c27 api-ref: Add response fields and response example for volume manage
https://developer.openstack.org/api-ref/block-storage/v3/index.html#manage-an-existing-volume
Response fields and response example are missing in the
"Manage an existing volume" api ref, this is to add them.

Change-Id: If624b672d1723a7226741da85802de87979f6c12
2018-10-09 15:18:53 +08:00
Matt Riedemann
00c5d946cd api-ref: mark name as optional in volume create API
The "name" parameter to the volume create API is optional,
this makes the docs reflect that. While in here, I've
renamed volume_name_1 to volume_name_optional so the variable
name is descriptive and dropped the redundant name_8 variable.

Change-Id: Ice42f06112a268b229f770f34096de19eb3447b2
Closes-Bug: #1794115
2018-09-24 10:41:34 -04:00
Sean McGinnis
a96fad9f3b Fix api-ref response code title levels
Using the wrong character resulted in the wrong title level
being used for the response codes, which in turn caused the
"detail" show/hide toggle to not be able to hide all of the
per-endpoint details. This corrects these to be at the correct
level.

Also ran into issues after changing them where sphinx was not
happy with the random title levels. This appears to be due to
the order processed and whether not earlier included files had
all subsequent levels. Adding an additional title in our first
included file resolved that problem.

Change-Id: I19405778980310f2d6d06eb7b23102f74a3d6e03
Closes-bug: #1755566
2018-03-13 15:57:54 -05:00
Sean McGinnis
2e5a91da72 Use rest_status_code for api-ref response codes
Rather than our freeform way of listing response codes in our
api-ref, we should be using the os-api-ref extension option to
get nicely formatted response code listings.

https://docs.openstack.org/os-api-ref/latest/usage.html#rest-status-code

Change-Id: Iee21f54fe7cf0ea28258966e2d0f8fa2849c83f2
2018-03-08 21:59:37 -06:00
junboli
03d4539247 Fix incorrect description in api ref
most places use description of backup, such as groups,
consistency groups, snapshots .etc, this is incorrect
this patch is to correct them.

Change-Id: I079f0351c93b5f19e87a42b4b0b84ff086b83820
2017-12-26 15:06:18 +08:00
Neha Alhat
0548a4172e Fix discrepancy in api-ref for create volume manage api
For create volume manage api, 'bootable', 'name', and 'metadata'
parameters are mandatory as per api ref document but as per code
these parameters are optional.

This patch fixes this discrepancy by updating the api-ref according
to the code.

Change-Id: I614c0866f52503ed7264f7bf74a193dd17590028
2017-12-07 15:06:09 +05:30
Sean McGinnis
fffdac20c2 api-ref: Make v3 enclosing objects consistent
Some request details provided information about the other
JSON value while others didn't. To make things consistent
and to make sure API consumers understand how the requests
need to be structured, this adds missing instances. It also
reorders some parameter lists to be a little more logical,
so even though we can't show the nested nature of some of
these, it at least doesn't show inner values before outer
ones.

This also corrects many errors seen while going through
the API ref. This is by no means exhaustive, and is already
somewhat out of the scope for this patch, so it is expected
that there are some (many) cases that are not addressed by
this patch. Those will be fixed with ongoing effort in
future patches.

Partial-bug: #1713517
Change-Id: I30964ba8d829778fd01174d639d44ba07e4b77a6
2017-09-01 09:54:34 -05:00
jeremy.zhang
7aee80e200 Fix api-ref for v3 volume and snapshot manage
From cinder api v3.8, manageable_volumes and manageable_snapshot
rest sources were added that were previously in api extensions.
This patch is to replace os-manage-[volume|snapshot] with
manageable_[volumes|snapshots] in v3 api-ref.

Change-Id: I7b9af1a1243adb082581bc3c67d8697eacc3e70a
2017-06-07 22:14:33 +08:00
wangxiyuan
95115ae7ab api-ref: add list manageable resource API
This patch did:
1. Add list manageable volumes API doc.
2. Add create and list manageable snapshots API doc.

Change-Id: Iccffb69b0ffb220f43258ee4c47d5d8964ae7836
Closes-bug: #1590977
2017-05-23 09:51:28 +08:00
wangzhenyu
f242907f01 Add missing and incorrect response and error codes in cinder api-ref
Closes-bug: 1674161

Change-Id: I963f0aa7de6c3df95c1341cac15da178032db1d3
2017-03-20 14:52:24 +00:00
Nicholas Jones
aa9cabdb42 Fix Block Storage API reference nesting
Modifies heading levels in .inc files to allow nested display in
table of contents. Table of contents depth has been changed to allow
this.

Change-Id: I3d8c9cf38a12272f0d32d3aa183d741277767535
2017-02-09 08:37:27 -06:00
wangxiyuan
144ddd5a4c [api-ref]Change tenant to project
Keystone API v2 was deprecated in Mitaka and uses "project"
instead of "tenant" in V3 now.

This patch change the "tenant" to "project" in Cinder API v3 doc.

Change-Id: I06d400f3e38d78014e9eae89b29b075adaecffe4
2017-01-26 23:18:32 +08:00
Gorka Eguileor
9acf079b8c Support A/A on Scheduler operations
This patch allows scheduler to work with clustered hosts to support A/A
operations.

Reporting capabilities of clustered hosts will be grouped by the
cluster_name instead of the host, and non clustered hosts will still be
stored by host.

To avoid replacing a newer capability report with an older version we
timestamp capabilities on the volumes (it's backward compatible) and
only replace currently stored values in scheduler when they are newer.

Following actions now support A/A operation:

- manage_existing
- manage_existing_snapshot
- get_pools
- create_volume
- retype
- migrate_volume_to_host
- create_consistencygroup
- create_group
- update_service_capabilities
- extend_volume

And Affinity and Driver filters have been updated.

The new functionality to notify service capabilities has not been
changed to Active/Active and will be done in another patch.

APIImpact: Added microversion 3.16
Specs: https://review.openstack.org/327283
Implements: blueprint cinder-volume-active-active-support
Change-Id: I611e75500f3d5281188c5aae287c62e5810e6b72
2016-12-14 17:48:28 +01:00
Mark T. Voelker
931e2f8161 Create v3 API Reference
The Cinder v3 API was marked CURRENT in Mitaka, but there no API ref
was ever created.  This is problematic for end users and would hinder
the v3 API from being included in DefCore Interoperability Guidelines
somewhere down the line (since one of DefCore's Criteria[1] is that a
Capability be well documented).  This patch creates an API ref for v3.
It also adds a header to the v2 index to show that it is SUPPORTED,
whereas v3 is CURRENT.

[1]
http://git.openstack.org/cgit/openstack/defcore/tree/doc/source/process/CoreCriteria.rst#n77

Change-Id: Ia3a8050cd04ad3a487a79d80acf9691feee6182e
Closes-Bug: #1616072
2016-09-19 14:33:01 -04:00