summaryrefslogtreecommitdiff
path: root/heat/tests/openstack/cinder/test_volume_utils.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2021-07-25 02:13:11 +0900
committerrabi <ramishra@redhat.com>2021-08-25 13:44:56 +0530
commitc0d82c5e312309320e6c9e5ca84cd3635375cce7 (patch)
tree41f9755b2c74e80b9986f3db1a206e00ee1fafd6 /heat/tests/openstack/cinder/test_volume_utils.py
parentb9a3395978bf60d3ce769b8fcedc60b7127f404f (diff)
downloadheat-stable/ussuri.tar.gz
Use Block Storage API v3 instead of API v2stable/ussuri
Block Storage API v2 was deprecated during Pike cycle and is being removed during Xena cycle, and current v3 API should be used instead. Unused volume_client and network_client in integration test code are also removed by this change. Note: granade tests is made non-voting temporally until the same issue is fixed in stable/victoria. Also, changes to use fedora 33 for tests. Depends-on: https://review.opendev.org/802150/ Change-Id: I6a2b5afa13480791971bbd8bba1f43b9f2db8294 (cherry picked from commit 1828df32fa946d49d8449ff1d8a26c05b3990a65) Move testing to Fedora 33 Now that the gate is unblocked, we can also test F33 for gating purposes here. Change-Id: Ie1c9075623d85b27aaf1ac67a3063e219726bc6f (cherry picked from commit 6a9c35d89804057b56e1b0b995265ce3eb68129d)
Diffstat (limited to 'heat/tests/openstack/cinder/test_volume_utils.py')
-rw-r--r--heat/tests/openstack/cinder/test_volume_utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/heat/tests/openstack/cinder/test_volume_utils.py b/heat/tests/openstack/cinder/test_volume_utils.py
index e5aee1bc1..9a05923a6 100644
--- a/heat/tests/openstack/cinder/test_volume_utils.py
+++ b/heat/tests/openstack/cinder/test_volume_utils.py
@@ -10,11 +10,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from cinderclient.v2 import client as cinderclient
-import mock
import six
+from unittest import mock
+
+from cinderclient.v3 import client as cinderclient
+
from heat.engine.clients.os import cinder
from heat.engine.clients.os import nova
from heat.engine.resources.aws.ec2 import volume as aws_vol
@@ -31,7 +32,7 @@ class VolumeTestCase(common.HeatTestCase):
super(VolumeTestCase, self).setUp()
self.fc = fakes_nova.FakeClient()
self.cinder_fc = cinderclient.Client('username', 'password')
- self.cinder_fc.volume_api_version = 2
+ self.cinder_fc.volume_api_version = 3
self.patchobject(cinder.CinderClientPlugin, '_create',
return_value=self.cinder_fc)
self.patchobject(nova.NovaClientPlugin, 'client',