diff options
Diffstat (limited to 'functest/opnfv_tests/openstack/cinder/read_data.sh')
-rw-r--r-- | functest/opnfv_tests/openstack/cinder/read_data.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/cinder/read_data.sh b/functest/opnfv_tests/openstack/cinder/read_data.sh new file mode 100644 index 000000000..2c5fdd4c0 --- /dev/null +++ b/functest/opnfv_tests/openstack/cinder/read_data.sh @@ -0,0 +1,26 @@ +#!/bin/sh -e + +# Copyright (c) 2018 Enea AB and others + +# This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# +# http://www.apache.org/licenses/LICENSE-2.0 + +DEST=$(mktemp -d) +VOL_DEV_NAME=${1:-vdb} +echo "VOL_DEV_NAME: $VOL_DEV_NAME" + +echo "$(lsblk -l -o NAME)" +if [ ! -z $(lsblk -l -o NAME | grep $VOL_DEV_NAME) ]; then + sudo mount /dev/$VOL_DEV_NAME $DEST + if [ -f $DEST/new_data ]; then + echo "Found new data!" + else + echo "Failed to find data!" + exit 1 + fi +fi + +exit 0 |