aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/cinder/write_data.sh
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-06-24 13:54:01 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-06-24 13:55:35 +0200
commit27a819cfea29ec903b44cea984b483f61ad61e10 (patch)
tree5a7efc61b683b41db13362f9f30052f874634afc /functest/opnfv_tests/openstack/cinder/write_data.sh
parentd2bf2e00eaedb5113f4baee3a707aa026dd1c18d (diff)
Fix hardcoded values in cinder_test
Only Fuel attaches a kdrive in all cases and then increase the device numbers. cinder_test now leverages on VOLUME_DEVICE_NAME as tempest. It also updates the testcase to leverage on the right scenario. Change-Id: Ib5cd17f69411f608f1b79e704604dc481581ebe0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/cinder/write_data.sh')
-rw-r--r--functest/opnfv_tests/openstack/cinder/write_data.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/cinder/write_data.sh b/functest/opnfv_tests/openstack/cinder/write_data.sh
index 70f8275f1..16cea17bf 100644
--- a/functest/opnfv_tests/openstack/cinder/write_data.sh
+++ b/functest/opnfv_tests/openstack/cinder/write_data.sh
@@ -9,10 +9,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
DEST=$(mktemp -d)
-VOL_DEV_NAME="$(lsblk -l -o NAME | grep -o "vdc\|sdc\b")"
-
+VOL_DEV_NAME=${1:-vdb}
echo "VOL_DEV_NAME: $VOL_DEV_NAME"
+echo "$(lsblk -l -o NAME)"
+
if [ ! -z $VOL_DEV_NAME ]; then
sudo /usr/sbin/mkfs.ext4 -F /dev/$VOL_DEV_NAME
sudo mount /dev/$VOL_DEV_NAME $DEST
@@ -25,3 +26,5 @@ else
echo "Failed to write data!"
exit 1
fi
+
+exit 0