According to the request documentation above this sample,
the key "cluster" should be "cluster_name".
Closes-Bug: #1970135
Signed-off-by: James Palmer <jpalmer7698@gmail.com>
Change-Id: Ifd64ba39a46cdbf7d75bc17baa2862790a7a39c1
Managing a volume to an encrypted volume type should not be allowed.
One reason is that there is no way for an operator to specify an
encryption key ID for the volume. Another is that we already don't
allow a volume of an encrypted type to be un-managed, so this change
will be symmetric.
Also update and correct the api-ref for this call.
Co-authored-by: Yadiel Xuan(轩艳东) <xuanyandong@inspur.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Change-Id: Ic2da41f3962c1108f974aca952bce3da6d6ac277
Closes-bug: #1944577
This patch adds volume re-image API to enable the ability to
re-image a specific volume.
Implements: blueprint add-volume-re-image-api
Co-Authored-by: Rajat Dhasmana <rajatdhasmana@gmail.com>
Change-Id: I031aae50ee82198648f46c503bba04c6e231bbe5
Inclusion of a project_id in API URLs is now optional, and no longer
required. Removing the project_id requirement facilitates supporting
Secure RBAC's notion of system scope, in which an API method is not
associated with a specific project.
The API v3 routing is enhanced to provide duplicate routes for API
methods that traditionally required a project_id in the URL:
- The existing route for which a project_id is in the URL
- A new route for when the URL does not include a project_id
To test both routes and ensure there are no regresssions, the "API
samples" functional tests include a project_id in the URLs, and the
rest of the functional tests do not include the project_id. This is
handled by changing the 'noauth' WSGI middleware to no longer add the
project_id, and adding a new 'noauth_include_project_id' middleware
filter that implements the legacy behavior.
A new microversion V3.67 is introduced, but it only serves to inform
clients whether the project_id is optional or required. When an API
node supports mv 3.67, the project_id is optional in all API requests,
even when the request specifies a earlier microversion. See the spec
Ia44f199243be8f862520d7923007e7182b32f67d for more details on this
behavior.
Note: Much of the groundwork for this is based on manila's patch
I5127e150e8a71e621890f30dba6720b3932cf583.
DocImpact
APIImpact
Implements: blueprint project-id-optional-in-urls
Change-Id: I3729cbe1902ab4dc335451d13ed921ec236fb8fd
This patch adds backups_links optional on parameters.yaml and
include as response parameter on v3 backups list(/backups)
and details(/backups/detail).
Closes-Bug: 1944463
Change-Id: I29d2fb4b33f508638d703659a7717edf2891527d
This patch adds information about default volume types i.e. project
default and deployment default (set via default_volume_type in cinder.conf)
and also regarding __DEFAULT__ type.
Change-Id: I47151b621003aea04082d38bd1d5cc911afab0f4
This patch adds information regarding the default volume types
(including __DEFAULT__) in the api-ref.
The sections modified are volume create, volume type list, show
default volume type and delete volume type.
Change-Id: I896c809bd4ff09e2f26398a1cdaa9a91dc0f8638
Introduces API microversion 3.66, which allows
snapshot creation on in-use volumes without the
force flag being passed.
Co-authored-by: Eric Harney <eharney@redhat.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Implements: blueprint fix-snapshot-create-force
Change-Id: I6d45aeab065197a85ce62740fc95306bce9dfc45
This patch adds a new REST API microversion to expose the new use_quota
DB field present in volumes and snapshots.
The field will be reported when listing and showing resources and can be
used when filtering as well.
The field is exposed in the REST API as `consumes_quota` to prevent
confusion for users and admins, since exposing it as `use_quota` may
give them the wrong impression that they can set it up for their own
purposes.
For users we say what is happening with the quota for that resource -it
consumes or doesn't consume quota-, whereas internally we express
instruction to the core code -whether to use quota or not-, hence the
difference in the naming.
APIImpact
DocImpact
Implements: blueprint temp-resources
Change-Id: I655a47fc75ddc11caf1defe984d9a66a9ad5a2e7
Our docs and tests are not up to date with the changes introduced to the
snapshot details introduced by the different microversion.
This patch updates the docs, samples, and tests.
Change-Id: I46fa6e1f7a5d6ad0147f17c2bafbf4fb8fa89eb8
In the documentation for importing backups the backup_id is removed
because the backup_id is generated after the upload and the user
does not need to provide it. Therefore the request parameter
backup_id has also been removed.
Closes-Bug: #1930526
Change-Id: I49e0adea8fbd97d49f4386b8240320ea2baf3661
Cinder only supports uploading volumes of encrypted volume types as
images with disk format 'raw' and container format 'bare'. Screen
for this at the REST API layer when the request is made.
Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
Closes-bug: #1935688
Currently the schema validation for attachment create assumes that
instance UUID will always be present in the request but that is
not the case when glance calls cinder for attachment.
Also there isn't any schema validation for MV3.54 which accepts
attachment mode in the request hence failing requests passing mode.
This patch removes the instance_uuid from required parameters and
adds schema validation for MV3.54.
Change-Id: I5108fd51effa4d72581654ed450d191a13e0e964
In this patch:
- adjusted VersionsController to return only v3
- removed cinder.api.v2.router
- adjustments to cinder.tests.unit.api.contrib to use /v3 only
- moved cinder.api.v2.snapshot_metadata (and tests) to cinder.api.v3
- moved cinder.api.v2.types (and view, tests) to cinder.api.v3
- updated versions response in api-ref
- removed unnecessary config option
- updated various sample config files
- removed experimental tempest-cinder-v2-api job
- updated some docs
- updated non-voting rally job config
Some cinder.api.v2 modules are left because the v3 classes depend on
them, but with the v2 router removed, these are unreachable via the
/v2 path.
Depends-on: https://review.opendev.org/c/openstack/rally-openstack/+/794891
(changes rally to use Block Storage API v3)
Depends-on: https://review.opendev.org/c/openstack/requirements/+/794894
(corrects regression in upper-constraint on Sphinx)
Change-Id: I2093d77db9beec7543c7524d2cd273e79dd5fd5d
We have many microversions but we but we haven't kept the samples, docs,
and tests up to date with them.
Of the many microversions this patch will focus on the ones that have
updated the fields returned for volumes updating the docs, adding the
appropriate json samples, updating the tests, and updating the
contributor docs to highlight the need to keep these up to date.
Some convenience methods have been added to facilitate the testing:
- use_versions: class decorator that allows us to run the same tests
with different microversions, each using their respective json and
templates.
- override_mv: method decorator to change the microversion in a single
test.
- common_api_sample: context manager to use the base sample instead of a
microversion specific one.
Change-Id: Ide303685a4cd1477c319b36e67a3b05c8d129126
In Change-ID I8db34f31d35375dc9656d53ac7af644c28a3d3fe we updated
api-ref samples, but functional tests didn't run so we didn't detect
that those samples changes broke our functional tests.
This patch fixes the functional tests, updates remaining cases of
key_size, and enables functional tests for api-ref changes to prevent
this from happening again.
Change-Id: I2a1f3121458c2db5e389dbcf31b34d412ffcd561
As the api-ref doc notes, the key size is usually
256. Use 256 in the examples instead of 128 to
make things more clear.
Change-Id: I8db34f31d35375dc9656d53ac7af644c28a3d3fe
Prior to this change, the "name" field in
the response for "Update a snapshot's metadata"
referred to volume transfers instead of snapshots.
Make "name" a generic parameter in case it is reused
in other APIs, and make specific parameters for
snapshots and transfers.
(Similar to I0b0a692139)
Change-Id: Ifb93bd1b20c216fd29ea90c4ac70709bee569d1d
The parameter "id" was used for volume transfer
and other various APIs, resulting in things like
consistency group snapshot APIs indicating that
they return volume transfer ids.
Make "id" generic for those cases and make a
specific "transfer_id" parameter for volume
transfers to prevent this problem in other
places.
Change-Id: I0b0a69213910c33570453cd961e10e22941369e9
HTTP 500 just means that something broke in
the service. We don't need to list this as part
of our API because we don't intend to deliver
it as a response for this API.
Change-Id: I7a08926fbbc5d2753f7d9d0c6c496ad3f967ec10
Add microversion 3.64 for including the encryption_key_id in the
volume and backup details when the associated volume is encrypted.
This facilitates associating encryption keys (typically stored in
Barbican) with the volume or backup that uses it.
The encryption_key_id is included in the details only when the
associated volume is encrypted, and it isn't using the all-zeros
key ID used by the legacy fixed-key ConfKeyMgr.
APIImpact
DocImpact
Implements: blueprint include-encryption-key-id-in-details
Change-Id: I16f54e6722cdbcbad4af1eb0d30264b0039412fd
NestedQuotaDriver was marked as deprecated in Train release and
was expect to be removed in Ussuri.
This patch removes the same in Wallaby release.
Change-Id: Ide2d53caf1bc5e3ba49f34b2f48de31abaf655d0
Introduces microversion (MV) 3.63 to add volume type ID
in the volume details.
This change comes to fix a problem we found in Gnocchi concerning
volumes monitored data. When a volume event is created, Cinder uses
the volume type as the volume type ID. On the other hand, Ceilometer
pollsters are always updating the volume_type value in Gnocchi with the
volume type from volume details API (which uses the volume type name
value).
That situation creates a massive number of resource revisions in
Gnocchi. This MV along with the Dynamic pollster system in Ceilometer
enables operators to overcome the issue.
Closes-Bug: https://bugs.launchpad.net/cinder/+bug/1911660
Change-Id: Icb88faeb00040250a25a5630aeb312a8434ed3c8
Signed-off-by: Rafael Weingärtner <rafael@apache.org>
This patch adds a feature by which we allow setting default volume types
for projects.
The following changes are made to achieve the feature:
1) Add 4 set of APIs, set, get, get_all, unset volume type
2) All policies (except get_all) default to system/domain/project admin
3) Preference order: project default, conf default
4) Logic to not allow deletion of default type
We validate set, get and unset APIs with keystone to verify a valid
project id is passed in the request and user has proper authorization
rights to show the project.
The policies are system/domain/project admin by default except get_all
policy which defaults to system admin.
Implements: Blueprint multiple-default-volume-types
Change-Id: Idcc949ed6adbaea0c2337fac83014998b81ff1f8
The response of "list groups with deatils" interface refers to
that of "show group details",whose response contains replication_status.
So it is nesscessary to add replication_status to the response of
"list groups with details", so that user can get replication information
directly instead of calling "show group details" interface again.
https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded
=list-groups-with-details-detail#generic-volume-groups-groups
Change-Id: I465cab85cd682b44a3b2fba116ea6dbb3f5aa0e9
Closes-Bug: #1894834
cluster_name attribute is useful for admin users in Active/Active
deployments.
Change-Id: Ifab99457b8d49207e8fc7869bd82d3cdfec7a911
Closes-Bug: #1874414i