]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/rbd_ls.py
4 from remote_view_cache
import RemoteViewCache
7 class RbdLs(RemoteViewCache
):
8 def __init__(self
, module_inst
, pool
):
9 super(RbdLs
, self
).__init
__(module_inst
)
17 from mgr_module
import ceph_state
18 ctx_capsule
= ceph_state
.get_context()
20 self
.log
.info("Constructing Rados")
21 cluster
= rados
.Rados(context
=ctx_capsule
)
23 self
.log
.info("Constructing IOCtx")
24 self
.ioctx
= cluster
.open_ioctx("rbd")
26 self
.log
.info("Constructing RBD")
30 self
.log
.debug("rbd.list")
31 names
= self
.rbd
.list(self
.ioctx
)
34 i
= rbd
.Image(self
.ioctx
, name
)