diff options
author | Yehuda Sadeh <yehuda@redhat.com> | 2015-12-10 00:29:30 +0100 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2016-02-12 01:13:43 +0100 |
commit | 673b28c34da19edb414d5b916d5652f2475ebc1c (patch) | |
tree | aec47508bed41406078b27fadfd24b1042110969 /src/test/rgw/test-rgw-common.sh | |
parent | test/rgw: initial work on multi site test framework (diff) | |
download | ceph-673b28c34da19edb414d5b916d5652f2475ebc1c.tar.xz ceph-673b28c34da19edb414d5b916d5652f2475ebc1c.zip |
test/rgw: basic meta sync status test util
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/test/rgw/test-rgw-common.sh')
-rw-r--r-- | src/test/rgw/test-rgw-common.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rgw/test-rgw-common.sh b/src/test/rgw/test-rgw-common.sh index 838169aa8e7..9a50fc146e8 100644 --- a/src/test/rgw/test-rgw-common.sh +++ b/src/test/rgw/test-rgw-common.sh @@ -15,6 +15,27 @@ print data$var END } +function python_array_len { +python - <<END +arr=$@ +print len(arr) +END +} + +function project_python_array_field { +var=$(var_to_python_json_index $1) +shift +python - <<END +arr=$@ +s='( ' +for x in arr: + s += str(x$var) + ' ' +s += ')' +print s +END +} + + x() { echo "x " "$@" eval "$@" |