blob: b90b5bb490e4e6b4ebae4f40112e5953ecfc5c39 [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
Rohit Karajgidd47d7e2012-07-31 04:11:01 -07002# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Joseph Lanouxa074c012015-08-04 15:44:07 +000016from tempest.common import compute
Yaroslav Lobankoved3a35b2016-03-24 22:41:30 -050017from tempest.common import waiters
Matthew Treinish4d352bc2014-01-29 18:29:18 +000018from tempest import config
Ken'ichi Ohmichi8c189082017-04-03 13:47:54 -070019from tempest.lib.common import api_version_utils
Ken'ichi Ohmichief1c1ce2017-03-10 11:07:10 -080020from tempest.lib.common.utils import data_utils
Jordan Pittier9e227c52016-02-09 14:35:18 +010021from tempest.lib.common.utils import test_utils
Attila Fazekasdc216422013-01-29 15:12:14 +010022import tempest.test
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070023
Matthew Treinish4d352bc2014-01-29 18:29:18 +000024CONF = config.CONF
25
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070026
Ken'ichi Ohmichi8c189082017-04-03 13:47:54 -070027class BaseVolumeTest(api_version_utils.BaseMicroversionTest,
28 tempest.test.BaseTestCase):
Sean Daguef237ccb2013-01-04 15:19:14 -050029 """Base test case class for all Cinder API tests."""
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070030
Ghanshyam Mann7d91b692020-03-03 10:21:50 -060031 # Set this to True in subclasses to create a default network. See
32 # https://bugs.launchpad.net/tempest/+bug/1844568
33 create_default_network = False
Andrea Frittolib21de6c2015-02-06 20:12:38 +000034 credentials = ['primary']
Zhi Kun Liu6e6cf832014-05-08 17:25:22 +080035
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070036 @classmethod
Rohan Kanade05749152015-01-30 17:15:18 +053037 def skip_checks(cls):
38 super(BaseVolumeTest, cls).skip_checks()
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070039
Matthew Treinish4d352bc2014-01-29 18:29:18 +000040 if not CONF.service_available.cinder:
Matthew Treinish4c412922013-07-16 15:27:42 -040041 skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
42 raise cls.skipException(skip_msg)
Rohan Kanade05749152015-01-30 17:15:18 +053043
Ken'ichi Ohmichi8c189082017-04-03 13:47:54 -070044 api_version_utils.check_skip_with_microversion(
Sophie Huangd458bf32021-10-12 17:08:41 +000045 cls.volume_min_microversion, cls.volume_max_microversion,
Ken'ichi Ohmichi8c189082017-04-03 13:47:54 -070046 CONF.volume.min_microversion, CONF.volume.max_microversion)
47
Rohan Kanade05749152015-01-30 17:15:18 +053048 @classmethod
49 def setup_credentials(cls):
Ghanshyam Mann7d91b692020-03-03 10:21:50 -060050 cls.set_network_resources(
51 network=cls.create_default_network,
52 subnet=cls.create_default_network)
Rohan Kanade05749152015-01-30 17:15:18 +053053 super(BaseVolumeTest, cls).setup_credentials()
Rohan Kanade05749152015-01-30 17:15:18 +053054
55 @classmethod
56 def setup_clients(cls):
57 super(BaseVolumeTest, cls).setup_clients()
Jordan Pittier8160d312017-04-18 11:52:23 +020058 cls.servers_client = cls.os_primary.servers_client
Rohan Kanade05749152015-01-30 17:15:18 +053059
jeremy.zhang0a427162017-04-21 12:47:56 +080060 if CONF.service_available.glance:
Jordan Pittier8160d312017-04-18 11:52:23 +020061 cls.images_client = cls.os_primary.image_client_v2
jeremy.zhang0a427162017-04-21 12:47:56 +080062
ghanshyam6c682ff2018-08-06 09:54:45 +000063 cls.backups_client = cls.os_primary.backups_client_latest
64 cls.volumes_client = cls.os_primary.volumes_client_latest
65 cls.messages_client = cls.os_primary.volume_messages_client_latest
66 cls.versions_client = cls.os_primary.volume_versions_client_latest
67 cls.groups_client = cls.os_primary.groups_client_latest
68 cls.group_snapshots_client = (
69 cls.os_primary.group_snapshots_client_latest)
70 cls.snapshots_client = cls.os_primary.snapshots_client_latest
Jordan Pittier8160d312017-04-18 11:52:23 +020071 cls.volumes_extension_client =\
ghanshyam6c682ff2018-08-06 09:54:45 +000072 cls.os_primary.volumes_extension_client_latest
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -070073 cls.availability_zone_client = (
ghanshyam6c682ff2018-08-06 09:54:45 +000074 cls.os_primary.volume_availability_zone_client_latest)
75 cls.volume_limits_client = cls.os_primary.volume_limits_client_latest
jeremy.zhang79a1cbf2017-05-07 16:09:17 +080076
Rohan Kanade05749152015-01-30 17:15:18 +053077 @classmethod
78 def resource_setup(cls):
79 super(BaseVolumeTest, cls).resource_setup()
Sophie Huangd458bf32021-10-12 17:08:41 +000080 cls.volume_request_microversion = (
81 api_version_utils.select_request_microversion(
82 cls.volume_min_microversion,
83 CONF.volume.min_microversion))
84 cls.compute_request_microversion = (
Ken'ichi Ohmichi8c189082017-04-03 13:47:54 -070085 api_version_utils.select_request_microversion(
86 cls.min_microversion,
Sophie Huangd458bf32021-10-12 17:08:41 +000087 CONF.compute.min_microversion))
Ghanshyam Mann18b45d72021-12-07 12:37:29 -060088 cls.setup_api_microversion_fixture(
89 compute_microversion=cls.compute_request_microversion,
90 volume_microversion=cls.volume_request_microversion)
Rohan Kanade05749152015-01-30 17:15:18 +053091
Rohan Kanade05749152015-01-30 17:15:18 +053092 cls.image_ref = CONF.compute.image_ref
93 cls.flavor_ref = CONF.compute.flavor_ref
94 cls.build_interval = CONF.volume.build_interval
95 cls.build_timeout = CONF.volume.build_timeout
96
Rohit Karajgidd47d7e2012-07-31 04:11:01 -070097 @classmethod
Benny Kopilov8a33ee12016-11-09 10:35:23 +020098 def create_volume(cls, wait_until='available', **kwargs):
99 """Wrapper utility that returns a test volume.
100
101 :param wait_until: wait till volume status.
102 """
Ken'ichi Ohmichiadb905e2016-08-26 15:16:23 -0700103 if 'size' not in kwargs:
104 kwargs['size'] = CONF.volume.volume_size
105
Nuno Santosb746d992016-11-17 15:41:55 -0500106 if 'imageRef' in kwargs:
jeremy.zhangcb0dd582017-04-25 08:48:38 +0800107 image = cls.images_client.show_image(kwargs['imageRef'])
108 min_disk = image['min_disk']
Nuno Santosb746d992016-11-17 15:41:55 -0500109 kwargs['size'] = max(kwargs['size'], min_disk)
110
zhufla57530c2017-03-23 11:38:12 +0800111 if 'name' not in kwargs:
zhufl354b2fb2016-10-24 15:24:22 +0800112 name = data_utils.rand_name(cls.__name__ + '-Volume')
zhufla57530c2017-03-23 11:38:12 +0800113 kwargs['name'] = name
Zhi Kun Liu3d6d9862014-06-16 16:43:59 +0800114
Ansuman Bebarta46d540d2021-02-16 18:48:33 +0530115 if CONF.volume.volume_type and 'volume_type' not in kwargs:
116 # If volume_type is not provided in config then no need to
117 # add a volume type and
118 # if volume_type has already been added by child class then
119 # no need to override.
120 kwargs['volume_type'] = CONF.volume.volume_type
121
Martin Kopec00e6d6c2019-06-05 14:30:06 +0000122 if CONF.compute.compute_volume_common_az:
123 kwargs.setdefault('availability_zone',
124 CONF.compute.compute_volume_common_az)
125
Ghanshyam8fc0ed22015-12-18 10:25:14 +0900126 volume = cls.volumes_client.create_volume(**kwargs)['volume']
zhuflcae2a752017-11-24 12:43:43 +0800127 cls.addClassResourceCleanup(test_utils.call_and_ignore_notfound_exc,
128 cls.delete_volume, cls.volumes_client,
129 volume['id'])
lkuchlan52d7b0d2016-11-07 20:53:19 +0200130 waiters.wait_for_volume_resource_status(cls.volumes_client,
131 volume['id'], wait_until)
Zhi Kun Liu6e6cf832014-05-08 17:25:22 +0800132 return volume
133
134 @classmethod
Attila Fazekas36b1fcf2013-01-31 16:41:04 +0100135 def create_snapshot(cls, volume_id=1, **kwargs):
136 """Wrapper utility that returns a test snapshot."""
zhufla57530c2017-03-23 11:38:12 +0800137 if 'name' not in kwargs:
zhufl354b2fb2016-10-24 15:24:22 +0800138 name = data_utils.rand_name(cls.__name__ + '-Snapshot')
zhufla57530c2017-03-23 11:38:12 +0800139 kwargs['name'] = name
zhufl354b2fb2016-10-24 15:24:22 +0800140
John Warrenff7faf62015-08-17 16:59:06 +0000141 snapshot = cls.snapshots_client.create_snapshot(
Ghanshyam0b75b632015-12-11 15:08:28 +0900142 volume_id=volume_id, **kwargs)['snapshot']
zhuflcae2a752017-11-24 12:43:43 +0800143 cls.addClassResourceCleanup(test_utils.call_and_ignore_notfound_exc,
144 cls.delete_snapshot, snapshot['id'])
lkuchlan52d7b0d2016-11-07 20:53:19 +0200145 waiters.wait_for_volume_resource_status(cls.snapshots_client,
146 snapshot['id'], 'available')
Attila Fazekas36b1fcf2013-01-31 16:41:04 +0100147 return snapshot
148
Ghanshyam Mannb0d15bf2017-05-02 04:55:47 +0000149 def create_backup(self, volume_id, backup_client=None, **kwargs):
lkuchlana2beb492016-08-17 12:42:44 +0300150 """Wrapper utility that returns a test backup."""
151 if backup_client is None:
152 backup_client = self.backups_client
zhuflefe033a2017-03-31 15:45:15 +0800153 if 'name' not in kwargs:
154 name = data_utils.rand_name(self.__class__.__name__ + '-Backup')
155 kwargs['name'] = name
lkuchlana2beb492016-08-17 12:42:44 +0300156
157 backup = backup_client.create_backup(
158 volume_id=volume_id, **kwargs)['backup']
Sampat Ponnagantief552162021-03-17 18:07:36 +0000159 # addCleanup uses list pop to cleanup. Wait should be added before
160 # the backup is deleted
161 self.addCleanup(backup_client.wait_for_resource_deletion,
162 backup['id'])
Ghanshyam Mannb0d15bf2017-05-02 04:55:47 +0000163 self.addCleanup(backup_client.delete_backup, backup['id'])
164 waiters.wait_for_volume_resource_status(backup_client, backup['id'],
165 'available')
lkuchlana2beb492016-08-17 12:42:44 +0300166 return backup
167
Attila Fazekasf7f34f92013-08-01 17:01:44 +0200168 # NOTE(afazekas): these create_* and clean_* could be defined
Attila Fazekas36b1fcf2013-01-31 16:41:04 +0100169 # only in a single location in the source, and could be more general.
170
lkuchlane9a15952017-01-08 08:11:23 +0200171 @staticmethod
172 def delete_volume(client, volume_id):
lkuchlan9bf9fac2016-06-19 15:32:33 +0300173 """Delete volume by the given client"""
174 client.delete_volume(volume_id)
175 client.wait_for_resource_deletion(volume_id)
176
zhuflcae2a752017-11-24 12:43:43 +0800177 @classmethod
178 def delete_snapshot(cls, snapshot_id, snapshots_client=None):
lkuchlancb2f8592016-07-17 15:18:01 +0300179 """Delete snapshot by the given client"""
lkuchlan5b2b3622017-02-14 15:48:36 +0200180 if snapshots_client is None:
zhuflcae2a752017-11-24 12:43:43 +0800181 snapshots_client = cls.snapshots_client
lkuchlan5b2b3622017-02-14 15:48:36 +0200182 snapshots_client.delete_snapshot(snapshot_id)
183 snapshots_client.wait_for_resource_deletion(snapshot_id)
lkuchlancb2f8592016-07-17 15:18:01 +0300184
Erlon R. Cruzba19bc72016-09-28 14:32:11 -0300185 def attach_volume(self, server_id, volume_id):
lkuchlan46437232017-01-08 08:29:25 +0200186 """Attach a volume to a server"""
Erlon R. Cruzba19bc72016-09-28 14:32:11 -0300187 self.servers_client.attach_volume(
188 server_id, volumeId=volume_id,
189 device='/dev/%s' % CONF.compute.volume_device_name)
lkuchlan52d7b0d2016-11-07 20:53:19 +0200190 waiters.wait_for_volume_resource_status(self.volumes_client,
191 volume_id, 'in-use')
192 self.addCleanup(waiters.wait_for_volume_resource_status,
193 self.volumes_client, volume_id, 'available')
Erlon R. Cruzba19bc72016-09-28 14:32:11 -0300194 self.addCleanup(self.servers_client.detach_volume, server_id,
zhufleba284e2016-12-16 10:44:41 +0800195 volume_id)
Erlon R. Cruzba19bc72016-09-28 14:32:11 -0300196
lkuchland4ecd0e2017-06-11 12:01:27 +0300197 def create_server(self, wait_until='ACTIVE', **kwargs):
zhufl22403a02016-10-26 10:25:19 +0800198 name = kwargs.pop(
zhufl7867a6e2016-10-18 15:37:12 +0800199 'name',
200 data_utils.rand_name(self.__class__.__name__ + '-instance'))
201
lkuchlan5fc69362016-09-05 08:42:34 +0300202 tenant_network = self.get_tenant_network()
Joseph Lanouxa074c012015-08-04 15:44:07 +0000203 body, _ = compute.create_test_server(
zhufl04190882017-05-23 10:21:48 +0800204 self.os_primary,
Joseph Lanouxa074c012015-08-04 15:44:07 +0000205 tenant_network=tenant_network,
206 name=name,
lkuchland4ecd0e2017-06-11 12:01:27 +0300207 wait_until=wait_until,
Joseph Lanouxa074c012015-08-04 15:44:07 +0000208 **kwargs)
lkuchlan5fc69362016-09-05 08:42:34 +0300209
Matthew Treinish445f5982016-09-14 19:27:04 -0400210 self.addCleanup(test_utils.call_and_ignore_notfound_exc,
211 waiters.wait_for_server_termination,
212 self.servers_client, body['id'])
lkuchlan5fc69362016-09-05 08:42:34 +0300213 self.addCleanup(test_utils.call_and_ignore_notfound_exc,
214 self.servers_client.delete_server, body['id'])
Joseph Lanouxa074c012015-08-04 15:44:07 +0000215 return body
Rohan Kanade9ce97df2013-12-10 18:59:35 +0530216
jeremy.zhang2abe00a2017-11-21 10:14:09 +0800217 def create_group(self, **kwargs):
218 if 'name' not in kwargs:
219 kwargs['name'] = data_utils.rand_name(
220 self.__class__.__name__ + '-Group')
221
222 group = self.groups_client.create_group(**kwargs)['group']
223 self.addCleanup(test_utils.call_and_ignore_notfound_exc,
224 self.delete_group, group['id'])
225 waiters.wait_for_volume_resource_status(
226 self.groups_client, group['id'], 'available')
227 return group
228
229 def delete_group(self, group_id, delete_volumes=True):
Gupta, Sangeet (sg774j)423ae452020-06-04 17:12:49 +0000230 group_vols = []
jeremy.zhang2abe00a2017-11-21 10:14:09 +0800231 if delete_volumes:
232 vols = self.volumes_client.list_volumes(detail=True)['volumes']
233 for vol in vols:
234 if vol['group_id'] == group_id:
Gupta, Sangeet (sg774j)423ae452020-06-04 17:12:49 +0000235 group_vols.append(vol['id'])
236 self.groups_client.delete_group(group_id, delete_volumes)
237 for vol in group_vols:
238 self.volumes_client.wait_for_resource_deletion(vol)
jeremy.zhang2abe00a2017-11-21 10:14:09 +0800239 self.groups_client.wait_for_resource_deletion(group_id)
240
James E. Blaire6d8ee12013-01-18 21:33:45 +0000241
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000242class BaseVolumeAdminTest(BaseVolumeTest):
Attila Fazekas3dcdae12013-02-14 12:50:04 +0100243 """Base test case class for all Volume Admin API tests."""
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000244
Andrea Frittolib21de6c2015-02-06 20:12:38 +0000245 credentials = ['primary', 'admin']
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000246
Rohan Kanade05749152015-01-30 17:15:18 +0530247 @classmethod
248 def setup_clients(cls):
249 super(BaseVolumeAdminTest, cls).setup_clients()
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000250
ghanshyam6c682ff2018-08-06 09:54:45 +0000251 cls.admin_volume_qos_client = cls.os_admin.volume_qos_client_latest
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -0700252 cls.admin_volume_services_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000253 cls.os_admin.volume_services_client_latest
254 cls.admin_volume_types_client = cls.os_admin.volume_types_client_latest
255 cls.admin_volume_manage_client = (
256 cls.os_admin.volume_manage_client_latest)
257 cls.admin_volume_client = cls.os_admin.volumes_client_latest
258 cls.admin_groups_client = cls.os_admin.groups_client_latest
259 cls.admin_messages_client = cls.os_admin.volume_messages_client_latest
260 cls.admin_group_snapshots_client = \
261 cls.os_admin.group_snapshots_client_latest
262 cls.admin_group_types_client = cls.os_admin.group_types_client_latest
263 cls.admin_hosts_client = cls.os_admin.volume_hosts_client_latest
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -0700264 cls.admin_snapshot_manage_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000265 cls.os_admin.snapshot_manage_client_latest
266 cls.admin_snapshots_client = cls.os_admin.snapshots_client_latest
267 cls.admin_backups_client = cls.os_admin.backups_client_latest
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -0700268 cls.admin_encryption_types_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000269 cls.os_admin.encryption_types_client_latest
jeremy.zhang644b01d2017-04-13 12:59:49 +0800270 cls.admin_quota_classes_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000271 cls.os_admin.volume_quota_classes_client_latest
272 cls.admin_quotas_client = cls.os_admin.volume_quotas_client_latest
273 cls.admin_volume_limits_client = (
274 cls.os_admin.volume_limits_client_latest)
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -0700275 cls.admin_capabilities_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000276 cls.os_admin.volume_capabilities_client_latest
Ken'ichi Ohmichic4fcdbb2017-03-15 16:53:28 -0700277 cls.admin_scheduler_stats_client = \
ghanshyam6c682ff2018-08-06 09:54:45 +0000278 cls.os_admin.volume_scheduler_stats_client_latest
jeremy.zhang79a1cbf2017-05-07 16:09:17 +0800279
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000280 @classmethod
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000281 def create_test_qos_specs(cls, name=None, consumer=None, **kwargs):
282 """create a test Qos-Specs."""
283 name = name or data_utils.rand_name(cls.__name__ + '-QoS')
284 consumer = consumer or 'front-end'
bkopilov62d21752016-06-08 10:16:11 +0300285 qos_specs = cls.admin_volume_qos_client.create_qos(
Jordan Pittier0359c4d2015-12-09 14:34:58 +0100286 name=name, consumer=consumer, **kwargs)['qos_specs']
zhuflcae2a752017-11-24 12:43:43 +0800287 cls.addClassResourceCleanup(cls.clear_qos_spec, qos_specs['id'])
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000288 return qos_specs
289
290 @classmethod
lkuchlan76650572016-05-23 12:30:10 +0300291 def create_volume_type(cls, name=None, **kwargs):
292 """Create a test volume-type"""
zhuflc6ce5392016-08-17 14:34:37 +0800293 name = name or data_utils.rand_name(cls.__name__ + '-volume-type')
lkuchlan76650572016-05-23 12:30:10 +0300294 volume_type = cls.admin_volume_types_client.create_volume_type(
295 name=name, **kwargs)['volume_type']
zhuflcae2a752017-11-24 12:43:43 +0800296 cls.addClassResourceCleanup(cls.clear_volume_type, volume_type['id'])
lkuchlan76650572016-05-23 12:30:10 +0300297 return volume_type
298
Lee Yarwood4bd9edb2020-01-31 17:26:25 +0000299 def create_encryption_type(self, type_id=None, provider=None,
300 key_size=None, cipher=None,
301 control_location=None):
302 if not type_id:
303 volume_type = self.create_volume_type()
304 type_id = volume_type['id']
305 self.admin_encryption_types_client.create_encryption_type(
306 type_id, provider=provider, key_size=key_size, cipher=cipher,
307 control_location=control_location)
308
309 def create_encrypted_volume(self, encryption_provider, key_size=256,
310 cipher='aes-xts-plain64',
311 control_location='front-end'):
312 volume_type = self.create_volume_type()
313 self.create_encryption_type(type_id=volume_type['id'],
314 provider=encryption_provider,
315 key_size=key_size,
316 cipher=cipher,
317 control_location=control_location)
318 return self.create_volume(volume_type=volume_type['name'])
319
Xing Yang0ddf83e2015-11-17 22:15:25 -0500320 def create_group_type(self, name=None, **kwargs):
321 """Create a test group-type"""
322 name = name or data_utils.rand_name(
323 self.__class__.__name__ + '-group-type')
324 group_type = self.admin_group_types_client.create_group_type(
325 name=name, **kwargs)['group_type']
326 self.addCleanup(self.admin_group_types_client.delete_group_type,
327 group_type['id'])
328 return group_type
329
lkuchlan76650572016-05-23 12:30:10 +0300330 @classmethod
zhuflcae2a752017-11-24 12:43:43 +0800331 def clear_qos_spec(cls, qos_id):
332 test_utils.call_and_ignore_notfound_exc(
333 cls.admin_volume_qos_client.delete_qos, qos_id)
Swapnil Kulkarni7dba3e62014-08-14 09:05:07 +0000334
zhuflcae2a752017-11-24 12:43:43 +0800335 test_utils.call_and_ignore_notfound_exc(
336 cls.admin_volume_qos_client.wait_for_resource_deletion, qos_id)
lkuchlan76650572016-05-23 12:30:10 +0300337
338 @classmethod
zhuflcae2a752017-11-24 12:43:43 +0800339 def clear_volume_type(cls, vol_type_id):
340 test_utils.call_and_ignore_notfound_exc(
341 cls.admin_volume_types_client.delete_volume_type, vol_type_id)
lkuchlan76650572016-05-23 12:30:10 +0300342
zhuflcae2a752017-11-24 12:43:43 +0800343 test_utils.call_and_ignore_notfound_exc(
344 cls.admin_volume_types_client.wait_for_resource_deletion,
345 vol_type_id)