cinder/cinder
Brian Rosmaita 5122b14658 Default volume_type set too early
If a volume_type is not specified in a volume-create request, change
I4da0c13b5b3f8174a30b8557f968d6b9e641b091 (introduced in Train) sets a
default volume_type in the REST API layer.  This prevents the
selection logic in cinder.volume.flows.api.create_volume.
ExtractVolumeRequestTask from being able to infer the appropriate
volume_type from the source volume, snapshot, or image metadata, and
has caused a regression where the created volume is of the default
type instead of the inferred type.

This patch removes setting the default volume_type in the REST API
and modifies the selection code in ExtractVolumeRequestTask slightly
to make sure a volume_type is always assigned in that function, and
adds and revises some tests.

Change-Id: I05915f2e32b1229ad320cd1c5748de3d63183b91
Closes-bug: #1879578
(cherry picked from commit 674c8e7286)
Conflicts:
  cinder/tests/unit/volume/flows/api/test_create_volume.py
  - cinder.tests.unit.test (victoria) -> cinder.test (pre-victoria)
(cherry picked from commit c1bdb233cf)
Conflicts:
  cinder/volume/flows/api/create_volume.py
  - add six, remove collections
  cinder/tests/unit/volume/flows/api/test_create_volume.py
  - add mock, remove unittest.mock
2020-07-12 16:10:27 -04:00
..
api Default volume_type set too early 2020-07-12 16:10:27 -04:00
backup Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
brick Replace 'lvconvert' from rootwrap 2019-02-17 14:33:31 -05:00
cmd Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
common Leverage hw accelerator in image compression 2019-09-18 03:01:18 +00:00
compute nova: use EndpointNotFound from keystoneauth1 2019-09-03 10:58:59 -04:00
db Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
group Continue renaming volume_utils (core) 2019-09-09 20:48:26 -04:00
image Configurable timeout of the QEMU img conversion 2020-02-12 03:37:30 +00:00
interface Remove BackupDriverWithVerify class 2019-05-14 23:19:13 +03:00
keymgr Fix "import xxx as xxx" grammar 2019-01-23 15:35:53 +08:00
locale Imported Translations from Zanata 2019-10-04 06:44:38 +00:00
message Add user messages for some volume snapshot actions 2019-04-26 17:02:05 -04:00
objects Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
policies Add project_id in group snapshots list and show API 2019-03-01 22:59:19 +05:30
privsep Revert "Remove truncate from rootwrap filters" 2019-03-06 10:08:10 -05:00
scheduler Fix: failed to create snapshot with DriverFilter 2020-04-08 13:29:27 +00:00
tests Default volume_type set too early 2020-07-12 16:10:27 -04:00
transfer Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
volume Default volume_type set too early 2020-07-12 16:10:27 -04:00
wsgi Prevent double-attachment race in attachment_reserve 2019-07-29 12:57:51 -04:00
zonemanager Cisco FC Zone Manager Driver - Python3.x support 2019-08-12 04:22:29 +00:00
__init__.py
context.py Preserve request id in Cinder logs when creating boot volume 2020-04-15 21:15:43 +00:00
coordination.py Remove deprecated heartbeat options 2017-10-03 14:41:18 -05:00
exception.py Fix: Create new cache entry when xtremio reaches snap limit 2020-01-24 05:31:39 +00:00
flow_utils.py
i18n.py Replace http with https for doc links in cinder 2017-10-17 11:14:01 +08:00
manager.py Allow configuring tpool size 2018-03-08 15:59:29 +01:00
opts.py Add "service token" documentation 2019-10-02 20:30:14 +00:00
policy.py Correct default policy_file in the sample config 2019-01-15 13:54:17 -05:00
quota.py Bump hacking version to 1.1.x 2019-05-30 15:06:02 -04:00
quota_utils.py Enable split logging for cinder-keystoneclient interaction 2018-09-26 08:53:30 +00:00
rpc.py Replace assert to raise AssertionError 2019-06-05 18:41:21 +03:00
service.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
ssh_utils.py Stop a connections leak when freeing an SSHPool 2018-02-14 18:16:55 -06:00
test.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
utils.py Move some code out of utils.py 2019-08-26 11:34:20 -04:00
version.py