summaryrefslogtreecommitdiffstats
path: root/src/test/osd/osdcap.cc
diff options
context:
space:
mode:
authorJason Dillaman <dillaman@redhat.com>2017-06-30 15:58:36 +0200
committerJason Dillaman <dillaman@redhat.com>2017-07-21 20:29:37 +0200
commitfc816cbec5ca4068e121fcea2bd6b51c83a84bee (patch)
treeacf14b4bc868932cc28cad9fa0551bce7f2d3799 /src/test/osd/osdcap.cc
parentosd: new 'rbd'/'rbd-read-only' osd cap profiles (diff)
downloadceph-fc816cbec5ca4068e121fcea2bd6b51c83a84bee.tar.xz
ceph-fc816cbec5ca4068e121fcea2bd6b51c83a84bee.zip
mon,osd: drop the "allow" prefix for profile caps
The use of the a profile implies that it sets everything up. If support for deny is ever added, it doesn't make much sense to deny a profile. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/test/osd/osdcap.cc')
-rw-r--r--src/test/osd/osdcap.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/osd/osdcap.cc b/src/test/osd/osdcap.cc
index 7820a77a666..3a594e3b8a7 100644
--- a/src/test/osd/osdcap.cc
+++ b/src/test/osd/osdcap.cc
@@ -70,7 +70,7 @@ const char *parse_good[] = {
"allow pool foo namespace=nfoo rwx; allow pool bar namespace nbar object_prefix rbd r",
"allow pool foo namespace=\"\" rwx; allow pool bar namespace='' object_prefix rbd r",
"allow pool foo namespace \"\" rwx; allow pool bar namespace '' object_prefix rbd r",
- "allow profile abc, allow profile abc pool=bar, allow profile abc pool=bar namespace=foo",
+ "profile abc, profile abc pool=bar, profile abc pool=bar namespace=foo",
0
};
@@ -1010,7 +1010,7 @@ TEST(OSDCap, AllowClassMultiRWX) {
TEST(OSDCap, AllowProfile) {
OSDCap cap;
- ASSERT_TRUE(cap.parse("allow profile read-only, allow profile read-write pool abc", NULL));
+ ASSERT_TRUE(cap.parse("profile read-only, profile read-write pool abc", NULL));
ASSERT_FALSE(cap.allow_all());
ASSERT_FALSE(cap.is_capable("foo", "", 0, "asdf", true, true, {}));
ASSERT_TRUE(cap.is_capable("foo", "", 0, "asdf", true, false, {}));
@@ -1018,7 +1018,7 @@ TEST(OSDCap, AllowProfile) {
// RBD
cap.grants.clear();
- ASSERT_TRUE(cap.parse("allow profile rbd pool abc", NULL));
+ ASSERT_TRUE(cap.parse("profile rbd pool abc", NULL));
ASSERT_FALSE(cap.allow_all());
ASSERT_FALSE(cap.is_capable("foo", "", 0, "asdf", true, true, {}));
ASSERT_FALSE(cap.is_capable("foo", "", 0, "rbd_children", true, false, {}));
@@ -1028,7 +1028,7 @@ TEST(OSDCap, AllowProfile) {
{{"rbd", true, true, true}}));
cap.grants.clear();
- ASSERT_TRUE(cap.parse("allow profile rbd-read-only pool abc", NULL));
+ ASSERT_TRUE(cap.parse("profile rbd-read-only pool abc", NULL));
ASSERT_FALSE(cap.allow_all());
ASSERT_FALSE(cap.is_capable("foo", "", 0, "rbd_children", true, false, {}));
ASSERT_TRUE(cap.is_capable("abc", "", 0, "asdf", true, false,