@@ -49,8 +49,13 @@ create_users() {
4949 ceph auth get-or-create client.snap_none mon ' allow r' >> $KEYRING
5050 ceph auth get-or-create client.snap_all mon ' allow r' osd ' allow w' >> $KEYRING
5151 ceph auth get-or-create client.snap_pool mon ' allow r' osd ' allow w pool=images' >> $KEYRING
52+ ceph auth get-or-create client.snap_pool_namespace mon ' allow r' osd ' allow w pool=images namespace=foo' >> $KEYRING
53+ ceph auth get-or-create client.snap_namespace mon ' allow r' osd ' allow w namespace=foo' >> $KEYRING
54+ ceph auth get-or-create client.snap_tag mon ' allow r' osd ' allow w tag fooapp *=*' >> $KEYRING
5255 ceph auth get-or-create client.snap_profile_all mon ' allow r' osd ' profile rbd' >> $KEYRING
5356 ceph auth get-or-create client.snap_profile_pool mon ' allow r' osd ' profile rbd pool=images' >> $KEYRING
57+ ceph auth get-or-create client.snap_profile_pool_namespace mon ' allow r' osd ' profile rbd pool=images namespace=foo' >> $KEYRING
58+ ceph auth get-or-create client.snap_profile_namespace mon ' allow r' osd ' profile rbd namespace=foo' >> $KEYRING
5459
5560 ceph auth get-or-create client.mon_write mon ' allow *' >> $KEYRING
5661}
@@ -208,12 +213,27 @@ test_remove_self_managed_snapshots() {
208213 create_self_managed_snapshot snap_pool images
209214 expect 1 create_self_managed_snapshot snap_pool volumes
210215
216+ create_self_managed_snapshot snap_pool_namespace images
217+ expect 1 create_self_managed_snapshot snap_pool_namespace volumes
218+
219+ create_self_managed_snapshot snap_namespace images
220+ create_self_managed_snapshot snap_namespace volumes
221+
222+ expect 1 create_self_managed_snapshot snap_tag images
223+ expect 1 create_self_managed_snapshot snap_tag volumes
224+
211225 create_self_managed_snapshot snap_profile_all images
212226 create_self_managed_snapshot snap_profile_all volumes
213227
214228 create_self_managed_snapshot snap_profile_pool images
215229 expect 1 create_self_managed_snapshot snap_profile_pool volumes
216230
231+ create_self_managed_snapshot snap_profile_pool_namespace images
232+ expect 1 create_self_managed_snapshot snap_profile_pool_namespace volumes
233+
234+ create_self_managed_snapshot snap_profile_namespace images
235+ create_self_managed_snapshot snap_profile_namespace volumes
236+
217237 # Ensure users cannot delete self-managed snapshots w/o permissions
218238 expect 1 remove_self_managed_snapshot snap_none images
219239 expect 1 remove_self_managed_snapshot snap_none volumes
@@ -224,11 +244,26 @@ test_remove_self_managed_snapshots() {
224244 remove_self_managed_snapshot snap_pool images
225245 expect 1 remove_self_managed_snapshot snap_pool volumes
226246
247+ remove_self_managed_snapshot snap_pool_namespace images
248+ expect 1 remove_self_managed_snapshot snap_pool_namespace volumes
249+
250+ remove_self_managed_snapshot snap_namespace images
251+ remove_self_managed_snapshot snap_namespace volumes
252+
253+ expect 1 remove_self_managed_snapshot snap_tag images
254+ expect 1 remove_self_managed_snapshot snap_tag volumes
255+
227256 remove_self_managed_snapshot snap_profile_all images
228257 remove_self_managed_snapshot snap_profile_all volumes
229258
230259 remove_self_managed_snapshot snap_profile_pool images
231260 expect 1 remove_self_managed_snapshot snap_profile_pool volumes
261+
262+ remove_self_managed_snapshot snap_profile_pool_namespace images
263+ expect 1 remove_self_managed_snapshot snap_profile_pool_namespace volumes
264+
265+ remove_self_managed_snapshot snap_profile_namespace images
266+ remove_self_managed_snapshot snap_profile_namespace volumes
232267}
233268
234269test_rbd_support () {
0 commit comments