forked from dell/csi-powerflex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csc.sanity
42 lines (29 loc) · 937 Bytes
/
csc.sanity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
source env.sh
echo; echo "getting plugin-info"
csc -e unix_sock identity plugin-info
sleep 5
echo; echo "probling the plugin (health check)"
csc -e unix_sock identity probe
sleep 5
echo; echo "creating a volume"
csc -e unix_sock controller create-volume tomcsc1 --cap 1,mount,xfs --params storagepool=$STORAGE_POOL | tee output
volumeId=$(cat output | awk '{ print $1; exit; }' | tr -d '"' )
echo volume id: $volumeId
sleep 5
echo; echo "listing volumes"
csc -e unix_sock controller list-volumes
sleep 5
echo; echo "publish volume"
csc -e unix_sock controller publish $volumeId --cap 1,mount,xfs --node-id $SDC_GUID
sleep 5
echo; echo "listing volumes on local node"
echo ls /dev/disk/by-id
ls /dev/disk/by-id
sleep 5
echo; echo "unpublish volume"
csc -e unix_sock controller unpublish $volumeId --node-id $SDC_GUID
sleep 5
echo; echo "deleting volume"
csc -e unix_sock controller delete-volume $volumeId
sleep 5