summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index ec77e602fda..1cb37b81ef6 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -543,3 +543,21 @@ function get_scrubd_count {
ps auxww | grep glusterfs | grep scrub.pid | grep -v grep | wc -l
}
+function quota_list_field () {
+ local QUOTA_PATH=$1
+ local FIELD=$2
+ $CLI volume quota $V0 list $QUOTA_PATH | grep $QUOTA_PATH\
+ | awk '{print $FIELD}'
+}
+
+function quota_object_list_field () {
+ local QUOTA_PATH=$1
+ local FIELD=$2
+ $CLI volume quota $V0 list-objects $QUOTA_PATH | grep $QUOTA_PATH\
+ | awk '{print $FIELD}'
+}
+
+function quota_usage()
+{
+ quota_list_field $1 4
+}