]> git.proxmox.com Git - ceph.git/blame - ceph/qa/workunits/rados/test_pool_access.sh
bump version to 12.2.5-pve1
[ceph.git] / ceph / qa / workunits / rados / test_pool_access.sh
CommitLineData
31f18b77
FG
1#!/bin/bash -x
2
3set -e
4
5expect_1()
6{
7 set -x
8 set +e
9 "$@"
10 if [ $? == 1 ]; then return 0; else return 1; fi
11}
12
13
14key=`ceph auth get-or-create-key client.poolaccess1 mon 'allow r' osd 'allow *'`
15rados --id poolaccess1 --key $key -p rbd ls
16
17key=`ceph auth get-or-create-key client.poolaccess2 mon 'allow r' osd 'allow * pool=nopool'`
18expect_1 rados --id poolaccess2 --key $key -p rbd ls
19
20key=`ceph auth get-or-create-key client.poolaccess3 mon 'allow r' osd 'allow rw pool=nopool'`
21expect_1 rados --id poolaccess3 --key $key -p rbd ls
22
23echo OK