From 016480eb8221a403e5224653e57c401fcb61acc0 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 23 Nov 2012 22:19:32 +0530 Subject: tests: Add volume utils in a new file Change-Id: Ie78d24ca466d4bddc5c0727ed8ed51707e1f2a34 BUG: 839595 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4228 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/volume.rc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/volume.rc (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc new file mode 100644 index 000000000..55c96b3ad --- /dev/null +++ b/tests/volume.rc @@ -0,0 +1,22 @@ +function volinfo_field() +{ + local vol=$1; + local field=$2; + + $CLI volume info $vol | grep "^$field: " | sed 's/.*: //'; +} + + +function brick_count() +{ + local vol=$1; + + $CLI volume info $vol | egrep "^Brick[0-9]+: " | wc -l; +} + +function volume_option() +{ + local vol=$1 + local key=$2 + $CLI volume info $vol | egrep "^$key: " | cut -f2 -d' '; +} -- cgit