On Mon, Nov 2, 2015 at 9:39 PM, Alex Leake <a.m.d.le...@bath.ac.uk> 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@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to