From 3eb7c97a6ddc4780ebcb833c1b86cf4b86b5e14d Mon Sep 17 00:00:00 2001
From: Patrick East <patrick.east@purestorage.com>
Date: Fri, 13 Jan 2017 11:44:54 -0800
Subject: [PATCH] Restrict enabling the manage_snapshot volume feature

The test that is in tempest for this feature is
specific to LVM and will *not* work for other backends
regardless of them supporting the feature. It shouldn't
default to enabled for everyone, only for LVM.

If others want to opt-in they can, but its definitely
the minority that would.

Change-Id: I21347f2a5069059e6413208b254d5acd246faaea
---
 lib/tempest | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/tempest b/lib/tempest
index 5a072291f1..deffcfae61 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -434,7 +434,11 @@ function configure_tempest {
     iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME
 
     # Volume
-    iniset $TEMPEST_CONFIG volume-feature-enabled manage_snapshot $(trueorfalse True TEMPEST_VOLUME_MANAGE_SNAPSHOT)
+    # Only turn on TEMPEST_VOLUME_MANAGE_SNAPSHOT by default for "lvm" backends
+    if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then
+        TEMPEST_VOLUME_MANAGE_SNAPSHOT=${TEMPEST_VOLUME_MANAGE_SNAPSHOT:-True}
+    fi
+    iniset $TEMPEST_CONFIG volume-feature-enabled manage_snapshot $(trueorfalse False TEMPEST_VOLUME_MANAGE_SNAPSHOT)
     # TODO(ynesenenko): Remove the volume_services flag when Liberty and Kilo will correct work with host info.
     iniset $TEMPEST_CONFIG volume-feature-enabled volume_services True
     # TODO(ameade): Remove the api_v3 flag when Mitaka and Liberty are end of life.