diff options
Diffstat (limited to 'tests/volume.rc')
-rw-r--r-- | tests/volume.rc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc index 02e5aed9d20..8782f461850 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -555,3 +555,23 @@ function drop_cache() { ;; esac } + +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 +} + |