Merge "Add flag for volume clone tests"
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 9db2321..db156f0 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import testtools
from testtools import matchers
from tempest.api.volume import base
@@ -138,6 +139,8 @@
imageRef=CONF.compute.image_ref, size=disk_size)
@test.idempotent_id('3f591b4a-7dc6-444c-bd51-77469506b3a1')
+ @testtools.skipUnless(CONF.volume_feature_enabled.clone,
+ 'Cinder volume clones are disabled')
def test_volume_create_get_update_delete_as_clone(self):
origin = self.create_volume()
self._volume_create_get_update_delete(source_volid=origin['id'])
diff --git a/tempest/config.py b/tempest/config.py
index b5f1de1..b6daa2e 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -702,6 +702,9 @@
cfg.BoolOpt('snapshot',
default=True,
help='Runs Cinder volume snapshot test'),
+ cfg.BoolOpt('clone',
+ default=True,
+ help='Runs Cinder volume clone test'),
cfg.ListOpt('api_extensions',
default=['all'],
help='A list of enabled volume extensions with a special '