The patch adds the following functionality:
* A default volume type (``__DEFAULT__``) will be
created during cinder DB migration.
* Admins can override the default type in cinder.conf
* Creating a new volume without any type (and
`default_volume_type` option is unset in cinder.conf)
will be assigned the ``__DEFAULT__`` type.
* The default volume type cannot be deleted
* All untyped volumes and snapshots will be migrated to the
``__DEFAULT__`` type.
Change-Id: I4da0c13b5b3f8174a30b8557f968d6b9e641b091
Implements: blueprint untyped-volumes-default-volume-type
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
The response sample of "Update a volume type" interface refers to
that of "Show volume type detail", which is not the same.
So this is to add a functional test to generate the update volume
type response sample of "Update a volume type" own.
https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-a-volume-type
Change-Id: I4e5bc87c6ab20ef6b85e0511d3965e7b1f4893ca
partially-implements: blueprint volume-response-schema-validation
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
Cleanup doc/requirements to just use what is needed for doc building.
Move reno to doc/requirements, add doc8 to test-requirements.
update tox.ini:
* doc8 should be in pep8 as linter and not docs according to PTI [1]
* Only build main doc in docs environment, CI uses this and we waste
just time building api-ref as well, there's a separate environment for
this. This follows PTI [1]
* Do not include requirements file for docs building, it's not needed
with apidoc.
* Use common deps for all docs build environments.
Cleanup doc/source/conf.py, with the switch to api-doc a lot of settings
are not needed anymore, also the eventlet bug is fixed.
Update openstackdocstheme to 1.20.0 and which allows to remove obsolete
setting of html_last_updated_fmt, project, latex_elements from conf.py.
Add doc8 to lower-constraints to make requirments-check happy.
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation
Change-Id: If86dd619402495d9d4470b14cb270fcf53db6794
Updates have been made to the api-ref sample files where some of them
have been moved under subdirectories to better organize things. A few of
the old files were left behind in doing this, and a few were added
without updating the files that referenced them. This cleans a few of
those cases up.
Change-Id: I58c8f2f2e533476385f1ec510fe04e31bceb64cc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
To have backward compatibility with MV 3.53, we need to include
OS-SCH-HNT in the ``cinder list-extensions`` response.
Change-Id: I9da1af4ac6df1d033a9baaba77135b329c87e6f8
Closes-Bug: #1831623
The 'os-' prefix is incorrectly written as 'is-' in one place (yes,
I checked, doesn't seem to occur anywhere else).
Change-Id: I02d1401314c9219f3f61c423dbc5b68044263105
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
This patch adds the following tests:
1) Volume transfer
2) Snapshot manage extensions
Change-Id: I6be1ca51ba29513fd9b1abe2791a7bb5815e20a3
Partially-Implements: blueprint generating-sample-files
This patch adds the tests for generating api-ref responses of
volume snapshots.
Change-Id: I1b8f265e2efd1760b34baf32d9d92cb4b2777cdd
Partially-Implements: blueprint generating-sample-files
Add ``project_id`` to response body of list group snapshots
with detail and show group snapshot detail APIs.
Merging the group and group snapshot response in same MV
was discussed in weekly meeting[1].
[1] http://eavesdrop.openstack.org/meetings/cinder/2019/cinder.2019-02-20-16.00.log.html#l-122
Change-Id: Ided66450b5d7de32551edbce249e94f6174da2eb
Implements: blueprint add-project-id-to-group-groupsnapshot-response
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
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>
We use *.inc files extensively, especially in the api-ref, but these
files are not covered by default with our doc8 validation.
This adds support for those files and fixes a few issues that were
identified after enabling coverage.
Change-Id: I807823f3cb44274c3940db55e901d434304a09f5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This patch adds support for transfer pagination.
Co-Authored-By: Yikun Jiang <yikunkero@gmail.com>
Closes-bug: #1814195
Change-Id: Idb04f783b2287b2b45d626131648b0005a232fbe
Add ``project_id`` to response body of list groups with detail and show
group detail APIs.
Depends-On: I190cc67a001ffce2a533480e6e39e26cd3f981df
Change-Id: I3bc34a30b02f8a1ec2c5fecbcde6bd369c8e4a76
Implements: blueprint add-project-id-to-group-response
Add a new microversion API to add source_project_id,
destination_project_id, accepted fields to the response of follow
APIs:
- Create a volume transfer
- Show volume transfer detail
- List volume transfer and detail
And the source_project_id will be recorded when a transfer is
created, the destination_project_id and accepted will be recorded
when a transfer is accepted.
Part of blueprint: improve-volume-transfer-records
Change-Id: I3d79f9a67a9aed7272871969e7c0942a1f396ea5
This patch adds Tests for the following :
1) API versions
2) API extensions
Change-Id: Ieaa1e2768c091b93c7afcbf04ec4a181cb021ec5
Partially-Implements: blueprint generating-sample-files
The status 'error_deleting' and 'deleted' doesn't exist in the doc.
Also the status error_restoring is a state of the volume, not backup.
This patch is to add and remove the respective statuses in the doc.
Change-Id: I96cd3d6fba38206a0a2b6c325092903b760b4ed4
The value of os-vol-image-meta is not in parameters.yaml, so use
os-show_image_metadata to replace it.
Change-Id: I0400a1bf8dbe34f4b857e62832d11b098a8a2d2f