Commit Graph

87 Commits

Author SHA1 Message Date
whoami-rajat 32f1145b7d Remove multiatttach request parameter
The initial cinder design[1][2][3] allowed users to create mutliattach
volumes by spcifying the ``multiattach`` parameter in the request
body of volume create operation (``--allow-multiattach`` option in
cinderclient).

This functionality changed in Queens with the introduction of
microversion 3.50[4] where we used volume types to store
the multiattach capabilities. Any volume created with a multiattach
volume type will be a multiattach volume[5].

While implementing the new functionality, we had to keep backward
compatibility with the *old way* of creating multiattach volumes.
We deprecated the ``multiattach`` (``--allow-multiattach`` on cinderclient
side) parameter in the queens release[6][7].
We also removed the support of the ``--allow-multiattach`` optional
parameter from cinderclient in the train release[8] but the API
side never removed the compatibility code to disallow functionality
of creating multiattach volumes by using the ``multiattach``
parameter (instead of a multiattach volume type).

This patch removes the support of providing the ``multiattach``
parameter in the request body of a volume create operation and will
fail with a BadRequest exception stating the reason of failure
and how it can be fixed.

[1] https://blueprints.launchpad.net/cinder/+spec/multi-attach-volume
[2] https://review.opendev.org/c/openstack/cinder/+/85847/
[3] https://review.opendev.org/c/openstack/python-cinderclient/+/85856
[4] f1bfd9790d
[5] https://docs.openstack.org/cinder/latest/admin/volume-multiattach.html#how-to-create-a-multiattach-volume
[6] 94dbf5cce2
[7] adb141a262
[8] 3c1b417959

Depends-On: https://review.opendev.org/c/openstack/tempest/+/875372
Closes-Bug: 2008259

Change-Id: I0ece6e279048abcc04b3674108290a80eca6bd62
2023-03-06 08:58:59 +00:00
Zuul 51f853d126 Merge "[api-ref]Host name is not necessary to contain '@'" 2019-10-07 21:23:21 +00:00
zhufl 6ff2c4a1d1 [api-ref]Host name is not necessary to contain '@'
As shown in https://zuul.opendev.org/t/openstack/build/e39652d2dc8f4cb394933da8f9a9bb59/log/job-output.txt,
host name may contain '@', but not necessary to contain '@',
like:
Request (VolumeHostsV3RbacTest:test_show_host):
200 GET https://10.208.227.163/volume/v3/67d6a092ee7d4cd4a6b3ae37812bec50/os-hosts/ubuntu-bionic-rax-dfw-0010673901
Response Body: {"host":
                 [{"resource":
                   {"volume_count": "2", "total_volume_gb": "2",
                    "total_snapshot_gb": "1", "project": "(total)",
                    "host": "ubuntu-bionic-rax-dfw-0010673901",
                    "snapshot_count": "1"}},
                  {"resource":
                   {"volume_count": "1", "total_volume_gb": "1",
                     "total_snapshot_gb": "0",
                     "project": "2aba5d9825ac47a7b8c3ea805af34a75",
                     "host": "ubuntu-bionic-rax-dfw-0010673901",
                     "snapshot_count": "0"}}}

Besides, the format 'host@backend' should be that of host_name_backend,
not host.

Change-Id: Id2c0be1e4d0471686674ef781b722087638c4c50
2019-09-04 10:03:58 +08:00
zhufl d4f1e57257 [api-ref]Fix values of service-status in list-hosts
In "List all hosts for a project", service-status should take
the values of ['available', 'unavailable'], (service-state takes
the value of ['enabled', 'disabled']), and because os-services API
uses service_status which requires returning `enabled` and `disabled`,
we need add a new parameter host_service_status for os-hosts API.

https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project
partially-implements: blueprint volume-response-schema-validation

Change-Id: Idde4a63f00862599a13bcfcdadc1d4459f27d3a4
2019-08-23 09:41:37 +08:00
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
Zuul 77c6f1010c Merge "Doc8: Stop skipping D001: Line too long" 2019-02-23 22:39:37 +00:00
Lee Yarwood 71ca8578be docs: Add os-migrate_volume_completion api-ref
This admin API is only called externally by Nova at present when
finishing the migration or retype of an attached volume. However for
future reference it would be really useful to have this listed in the
official API reference guide.

Change-Id: I5fad6eb4903784870aa26fa0996a391bbbbb9276
2019-02-20 11:40:30 +00:00
Sean McGinnis d5b539be36
Doc8: Stop skipping D001: Line too long
This cleans up the cases where we had D001 violations so we can stop
skipping that check in doc8 runs.

Change-Id: Ie52f6ecac1a645fcbcc643b9ca63e033b622d830
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-02-19 16:51:56 -06:00
Zuul 3902a2bf28 Merge "api-ref: Correct response body type for show host details" 2019-02-06 23:25:01 +00:00
zhufl 7fba6fdc4b api-ref: fix some issues in volumes interfaces
1. group_id is missing from the response of list-voluems and create_volume.

2. shared_targets and service_uuid are new in 3.48

3. migration_status, os-vol-host-attr:host, os-vol-mig-status-attr:migstat,
   and os-vol-mig-status-attr:name_id may not always be present, so they
   should be optional parameters.

https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=reset-a-backup-s-status-detail,update-a-backup-detail,create-a-backup-detail#create-a-volume
https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=reset-a-backup-s-status-detail,update-a-backup-detail,create-a-backup-detail#show-a-volume-s-details

Change-Id: I11201f2a604818e633eb2000b3c69162c668721d
2018-11-27 13:20:35 +08:00
zhufl 192da355ba api-ref: add missing volumes_links in list-volume interfaces
https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=list-accessible-volumes-detail#list-accessible-volumes
https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=#list-accessible-volumes-with-details

volumes_links is in the response body of list-volume and
list-volume-with-details when pagination is used. So it should
be an optional parameter.

Change-Id: If61797f9a5cb5c522ed62886f4114d43e7cbbdef
2018-11-09 10:52:18 +08:00
Felipe Monteiro cf80d437a8 api-ref: Correct response body type for show host details
Currently [0] claims that "total_volume_gb" in the response body
is of type int -- but it is actually a string, going off the example
response body as well as the API code, which clearly casts the
value to a str() [1].

[0] https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=show-host-details-for-a-project-detail#show-host-details-for-a-project
[1] 95d6d49b01/cinder/api/contrib/hosts.py (L169)

Change-Id: I36486724cc30389d371ec0b18b9b7f96883d193c
2018-11-02 09:53:21 -04:00
Zuul 683c795252 Merge "Remove source_replica info from api-ref" 2018-11-02 13:44:56 +00:00
Zuul e576261f7e Merge "api-ref: fix some inconsistencies in snapshot API" 2018-10-19 19:54:31 +00:00
Zuul 2a1f2c7c5a Merge "api_ref: total_capacity and free_capacity can be float" 2018-10-19 19:54:24 +00:00
zhufl 5c82ba8b4b api-ref: fix some inconsistencies in snapshot API
https://developer.openstack.org/api-ref/block-storage/v3/index.html#list-snapshots-and-details

1. updated_at is missing in the response fields of show-snapshot
   and list-snapshots
2. id's description is "The UUID of the volume transfer.", which
   is incorrect.
3. volume_id's description is "The UUID of the volume.", which is
   not very accurate.
4. os-extended-snapshot-attributes:progress is something like '100%',
   so it should be string, not integer
5. response fields of show-snapshot-metadata is incorrect.
6. metadata is missing in the response example of update-snapshot
7. snapshots_links is missing in the response of list-snapshot

Change-Id: I0f6994c2d2dc27d3d594acdd460e27c338f86a2c
2018-10-16 10:20:47 +08:00
zhufl 6cf93c2f80 api_ref: total_capacity and free_capacity can be float
Some drivers will report total_capacity and free_capacity
as float, so this is to change the data type description to
include floating point.

Change-Id: Icd206ba3733adf9543a9e1384ef7245e287ee858
2018-10-09 10:10:23 +08:00
Sean McGinnis 0b8bf9b7fc Remove source_replica info from api-ref
With the addition of schema validation and the release of cinderclient
4.0.0 we no longer accept source_replica as a volume creation parameter.
This was part of the short lived replication v1 functionality that was
removed several releases ago and never had support beyond one backend
type for one or two releases and has had no affect for quite a while
now.

Change-Id: Idd848628759884c1e637ca17dc292f776e4adf47
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-04 14:29:47 +00:00
whoami-rajat 1323ef7383 API-REF:os-quota-sets v2 API reference has the wrong parameters
The request/response parameters for the v2 os-quota-sets API
reference is copied from the compute API and is therefore wrong
for the block storage API:
https://developer.openstack.org/api-ref/block-storage/v2/#quota-sets-extension-os-quota-sets

This patch replaces the wrong response with the correct parameters.

Change-Id: I6df1d60843943c99505a735a6dec4f47270a1c2e
Closes-Bug: #1794125
2018-10-03 23:05:17 +05:30
Zuul 7ca51e9271 Merge "api-ref: clarify volume_type param in volume create API" 2018-10-02 16:57:24 +00:00
zhufl 8fec696bfd api-ref: total/free_capacity should be with postfix _gb
https://developer.openstack.org/api-ref/block-storage/v3/index.html#list-all-back-end-storage-pools
free_capacity and total_capacity in "List all back-end storage pools"
should be free_capacity_gb and total_capacity_gb

Change-Id: Ic0690d12147fa63b903f3442eccde88c1d501711
2018-09-28 15:30:37 +08:00
Zuul c61f36be76 Merge "api-ref: add docs for os-migrate_volume API" 2018-09-26 00:58:53 +00:00
Matt Riedemann 3eda3fa7a4 api-ref: clarify volume_type param in volume create API
The volume_type parameter to the volume create API can be
either the volume type name or ID, the cinder-api will look
it up either way. This wasn't obvious from the API reference
and required digging into the code to figure it out. This change
simply clarifies the usage in the API reference.

Change-Id: Iae8c43374dee9767e17252279822ccd2121d8246
2018-09-24 11:13:05 -04: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
TommyLike a7dca2e783 Update doc for get-pools API
Update name description for get-pools
API's document.

Change-Id: I403c968e8b0a85d81dc8898153f18e418ca5d289
2018-08-29 09:38:23 +00:00
Matt Riedemann 76cc9bd02b api-ref: add docs for os-migrate_volume API
Adds the v2 and v3 API reference documentation for the
admin-only (by default) os-migrate_volume volume action
API. The only major difference with the v3 API is the
cluster parameter introduced in the 3.16 microversion.

Change-Id: I70f6b2cc4d25ea155ce09ddeec26b995890a2db3
Partial-Bug: #1607539
2018-08-22 20:38:22 -04:00
Zuul 9bfc74428d Merge "Fix create backup API document" 2018-06-05 00:01:40 +00:00
jeremy.zhang a6dd458612 Fix api-ref for backup export and import
Add missing paramater description for backup export and import function.

Change-Id: I6408138ac738717c766752f5358025dbe62d7319
2018-05-29 22:51:19 +08:00
junboli 8ee82f04e6 Missing request parameters in update quotas
"backup_gigabytes" and "per_volume_gigabytes" parameters
are supported in api v2, they aren't mentioned in api v2
document[1]. On the other hand both of them are mentioned
in api v3 document[2].

[1] https://developer.openstack.org/api-ref/block-storage/
    v2/index.html#update-quotas
[2] https://developer.openstack.org/api-ref/block-storage/
    v3/index.html?highlight=backup_gigabytes#update-quotas
    -for-a-project

Change-Id: I135efd5c2b4735f5821922643926390976453bf5
Closes-bug: #1727631
2018-05-29 20:03:51 +08:00
TommyLike 1a5b0c0133 Fix create backup API document
Make 'snapshot_id' optional as well as
reword parameter description.

Change-Id: I9ee404a8db5320d2a4cd7b50c2166446169bbba5
2018-05-16 15:29:09 +08:00
Zuul c93371dc2a Merge "Add missing 'transfer' parameter in API document" 2018-05-02 23:27:10 +00:00
Zuul 283928fe1d Merge "api-ref: modify 'has_dependent_backups' param's description" 2018-05-02 17:29:52 +00:00
TommyLike 181ab96ac8 Add missing 'transfer' parameter in API document
This patch adds the missing parameter 'transfer' to accept
transfer's API document.

Change-Id: I88f0a01ef22be9ff1b483e517f08866a7e1b19ce
2018-05-02 15:57:52 +00:00
lihaijing 1ae1a02933 api-ref: modify 'has_dependent_backups' param's description
Change-Id: Iec37578d367db109ef4d8eb8c07c832402661f75
Closes-Bug: #1766057
2018-04-27 15:33:28 +08:00
Dongcan Ye 8addf353f4 api-ref: Correct the cgsnapshot_id parameter
The cgsnapshot_id parameter in delete and get operations
should in path, and is required.

Change-Id: I5525c05769dcd27ff06d7b1d4c97698f99075f09
2018-04-26 17:08:32 +00:00
Sean McGinnis e4a41feab3 Clarify sizing when creating vol from source
The api-ref stated new volumes created from a source volume or
snapshot would have the same size as the original, but that is
not the case if a larger size is requested.

Change-Id: Id2e0d53b56d5879026c182521a512dc2cfcd28f7
2018-04-17 17:47:39 -05:00
TommyLike 902719a46e Remove extended attribute 'os-volume-replication' in Doc
'os-volume-replication:extended_status' and
'os-volume-replication:driver_date' are unavailable
since the merge of patch [1] during Liberty, remove these
from API document.

[1]: https://review.openstack.org/#/c/275797/

Change-Id: Ib319702f085930a6bf528ef95fb17a7da8451e96
2018-03-31 11:53:21 +08:00
liuyamin e3a873dbd8 Remove unused parameters in v2/v3 parameters.yaml
Change-Id: I835dda262b22af8fe7a0af1a1333bf9842d65013
2018-02-01 23:12:18 +08:00
Matt Riedemann aff9ca2b37 api-ref: update migration_policy retype note about encrypted volumes
Nova has historically not supported swap volume operations (via
cinder volume retype / volume migration) for an in-use encrypted
volume.

That was recently addressed via nova bug 1739593.

However, as of change Ibfa64f18bbd2fb70db7791330ed1a64fe61c1355
in nova, depending on the version of libvirt/qemu on the compute host,
a luks-encrypted volume will use native qemu luks decryption. That
does not yet support blockRebase operations which are used during
swap volume due to https://bugzilla.redhat.com/show_bug.cgi?id=760547.

So it's safe to say that for now, a retype which involves a volume
migration is not supported for an in-use encrypted volume.

Change-Id: I7ce992f51d50d00950d3fc4ebb44b69a31a94787
Related-Bug: #1739593
2018-01-25 13:15:48 -05:00
Zuul 988818388f Merge "api-ref: fix the response parameter for multiattach" 2018-01-18 17:39:42 +00:00
liuyamin 88a21ab20e Fix 'volume_type' for in the api-ref
1 The 'volume_type' shoud be required in the rest_method of request.
  So fix the request paremeter about volume_type
2 Fix  the parameters of 'volume_type' in the volumes-v3-volumes.inc

Change-Id: I585db62579ac134885a49dc020508a9f0fba3c78
2018-01-15 14:19:26 +08:00
Matt Riedemann fe670324f5 api-ref: fix the response parameter for multiattach
The multiattach parameter is optional when creating
a volume but is required to be in the response when
showing a volume.

This fixes the parameter usage, renames the parameters
so they are more clear (multiattach_1 was for the response
but was never used), and also adds a note to the multiattach
request parameter about how support is dependent on the volume
type being used to create the volume.

Change-Id: Ifaa29140a8e8a9b8090f33fb83e4bb5c98ee847f
2018-01-10 21:48:30 -05:00
Anton Arefiev 69b4a3c9ab API ref: add host format to description
Specify host and os-vol-host-attr:host parameters format.

Change-Id: Ib0ab0319e04e23e93f31a49bca17ed30af2474d0
2017-12-12 14:38:50 +02:00
Chris Friesen 8cb4aedda6 Update api-ref to include volume_image_metadata
The detailed information for a volume can include "volume_image_metadata"
in the case where the volume was created from an image, or in the case
where the volume was created from a snapshot of such a volume.

Update the API ref to include the field so we accurately represent
the code.

Change-Id: If5fcdefaa10bfb00e60aa4559d3282d3c6a53752
Closes-Bug: #1732763
2017-11-17 21:24:44 +00:00
zhangbailin 234a0784bf Replace http with https for doc links in cinder
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links
For example:
(1)http://docs.openstack.org/admin-guide/blockstorage_nfs_backend.html
->https://docs.openstack.org/cinder/latest/admin/blockstorage-nfs-backend.html
(2)http://docs.openstack.org/oslo.i18n/latest/user/index.html
->https://docs.openstack.org/oslo.i18n/latest/user/index.html
(3)http://docs.openstack.org/ --> https://docs.openstack.org/
(4)http://docs.openstack.org/admin-guide/blockstorage_multi_backend.html
->https://docs.openstack.org/cinder/latest/admin/blockstorage-multi-backend.html

Change-Id: I7fcdc4453cb3bad713c7d770012411701cca742b
Closes-Bug:#1710054
2017-10-17 11:14:01 +08:00
lihaijing 4403ed17ca Api-ref: change 'tenant' to 'project' in v2 doc
Since 'tenant' is the old term, all things should now refer to 'project'.

Change-Id: I3a255df758583a3c4301041c8ebffb90b8263fef
2017-09-27 18:14:25 +08:00
lihaijing baf811f20d Api-ref: fix v2/v3 hosts extension api doc
Supplement error response codes and fix parameters problem.

Change-Id: Ia24c6980f437ab6838d64c345bc9c10a100762e1
Closes-Bug: #1715286
2017-09-26 10:33:07 +08:00
Sean McGinnis 8db0e33a3a api-ref: Remove unused parameter defs
During the initial migration of the api-ref docs, there were
several parameter definitions pulled over that are not actually
used anywhere in the docs.

It may be that some of these _should_ be referenced, but at
least as of right now they are not. Rather than carrying them
around on the chance that they could be used down the road, we
should just clean them out for now.

Change-Id: Ic9018608b00705c80df05243647f5c81124610df
2017-09-03 11:22:55 -05:00
Sean McGinnis f3afb7b4fd api-ref: Add backup import and export
During the migration to in-tree api-ref docs we somehow lost the details
for backup export_record and import_record. Adding back in.

Also fixing up a few records that referred to the wrong parameter record
names, resulting in their descriptions referring to volume transfer for
backup operations.

Change-Id: I6fc555729c1b8404887d41424831fc48934f1491
Closes-bug: #1628812
Closes-bug: #1712923
2017-08-24 18:06:38 -05:00
Jenkins 0e5f7a1175 Merge "Clean up repl v1 volume creation from replication" 2017-08-18 16:49:40 +00:00