commit 5122b146589368189ae1645985cc10030c90ecc5
Author: Brian Rosmaita <email address hidden>
Date: Wed May 20 16:15:26 2020 -0400
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.
Reviewed: https:/ /review. opendev. org/740598 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=5122b146589 368189ae1645985 cc10030c90ecc5
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 5122b1465893681 89ae1645985cc10 030c90ecc5
Author: Brian Rosmaita <email address hidden>
Date: Wed May 20 16:15:26 2020 -0400
Default volume_type set too early
If a volume_type is not specified in a volume-create request, change 3f8174a30b8557f 968d6b9e641b091 (introduced in Train) sets a volume. flows.api. create_ volume. meRequestTask from being able to infer the appropriate
I4da0c13b5b
default volume_type in the REST API layer. This prevents the
selection logic in cinder.
ExtractVolu
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 questTask slightly
and modifies the selection code in ExtractVolumeRe
to make sure a volume_type is always assigned in that function, and
adds and revises some tests.
Change-Id: I05915f2e32b122 9ad320cd1c5748d e3d63183b91 6408291de1dc639 5aac2b04b1) tests/unit/ volume/ flows/api/ test_create_ volume. py tests.unit. test (victoria) -> cinder.test (pre-victoria) a8b60b481e67abc 9b4613893c) volume/ flows/api/ create_ volume. py tests/unit/ volume/ flows/api/ test_create_ volume. py
Closes-bug: #1879578
(cherry picked from commit 674c8e7286999bb
Conflicts:
cinder/
- cinder.
(cherry picked from commit c1bdb233cfd5b32
Conflicts:
cinder/
- add six, remove collections
cinder/
- add mock, remove unittest.mock