cinder/cinder/api/v2
Rajat Dhasmana b46f5becda Modify default/delete volume type logic
This patch modifies the delete volume type logic such that a volume type
cannot be deleted if:
1) It is the default volume type
2) The default type configured is wrong/doesn't exist

This also implies that there will exist atleast 1 volume type in the
deployment and that will be the default volume type.

This also includes following 2 changes on the default_volume_type conf option:
1) It is a mandatory field
2) default value of this config option is '__DEFAULT__'

All these changes ensure that we don't allow creating untyped volumes.

Also it is now possible to delete the '__DEFAULT__' type as it acts
as a normal type.

Change-Id: Ifa3d22305060b5913332cad89ea696bf7fd84ce1
Closes-Bug: #1886632
(cherry picked from commit e5d842eb1b)
2020-09-16 14:47:10 +00:00
..
views [policy in code] Add support for volume, volume type resources 2017-10-17 09:54:28 +08:00
__init__.py adding copy of v1 as v2 2012-11-21 21:26:40 -08:00
limits.py Re-enable new pycodestyle errors 2019-06-04 14:28:09 +00:00
router.py [Trivial fix]Remove unnecessary slash 2019-05-06 13:56:27 +08:00
snapshot_metadata.py Performance: Remove useless snapshot object get 2017-06-23 01:49:53 +00:00
snapshots.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
types.py Refactor API utilities into api_utils.py 2019-08-05 16:59:59 -04:00
volume_metadata.py V3 jsonschema validation: Volume metadata 2017-12-08 12:40:01 +05:30
volumes.py Modify default/delete volume type logic 2020-09-16 14:47:10 +00:00