Re: retrieving quota of ceph pool using librados or python API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 2, 2015 at 9:39 PM, Alex Leake <A.M.D.Leake@xxxxxxxxxx> wrote:
> Hello all,
>
>
> I'm attempting to use the python API to get the quota of a pool, but I can't
> see it in the documentation
> (http://docs.ceph.com/docs/v0.94/rados/api/python/).

The call you're looking for is Rados.mon_command, which seems to be
missing in the documentation for some reason.  This is the same
interface that the ceph CLI uses.

>>> r = rados.Rados(conffile="./ceph.conf")
>>> r.connect()
>>> json.loads(r.mon_command(json.dumps({"prefix": "osd pool get-quota", "pool": "rbd", "format": "json-pretty"}), "")[1])
{u'pool_name': u'rbd', u'quota_max_objects': 0, u'quota_max_bytes': 0,
u'pool_id': 0}

Cheers,
John
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux