⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
rbd
All Projects
Ceph
»
rbd
Overview
Activity
Roadmap
Issues
Spent time
Download (512 Bytes)
Bug #11895
ยป testPerms.py
Sam Matzek
, 06/05/2015 02:59 PM
import
sys
import
rados
import
rbd
if
len
(
sys
.
argv
)
<
3
:
print
'
Usage: pool image snapshot
'
exit
(
1
)
pool
=
sys
.
argv
[
1
]
img
=
sys
.
argv
[
2
]
snapshot
=
None
if
len
(
sys
.
argv
)
==
4
:
snapshot
=
sys
.
argv
[
3
]
print
'
Using pool %s, image %s, snapshot %s
'
%
(
pool
,
img
,
snapshot
)
conn
=
rados
.
Rados
(
conffile
=
'
/etc/ceph/ceph.conf
'
,
rados_id
=
'
glance
'
)
conn
.
connect
()
vms
=
conn
.
open_ioctx
(
pool
)
image
=
rbd
.
Image
(
vms
,
img
,
snapshot
=
snapshot
)
image
.
close
()
vms
.
close
()
conn
.
shutdown
()
print
'
made it to the end
'
(1-1/1)
Loading...