]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/restful/api/crush.py
1 from pecan
import expose
2 from pecan
.rest
import RestController
4 from restful
import common
, context
6 from restful
.decorators
import auth
9 class CrushRule(RestController
):
10 @expose(template
='json')
12 def get(self
, **kwargs
):
16 crush
= context
.instance
.get('osd_map_crush')
17 rules
= crush
['rules']
20 rule
['osd_count'] = len(common
.crush_rule_osds(crush
['buckets'], rule
))
24 class Crush(RestController
):