]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr,pybind/mgr: add OSDMap.build_simple() method
authorKefu Chai <kchai@redhat.com>
Fri, 18 Jun 2021 14:23:40 +0000 (22:23 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 18 Jun 2021 15:02:21 +0000 (23:02 +0800)
commitf5b1b0116bcf63279fba549a69a4692dec87d0be
treef9528aa67027a70ebc091055873ee004ee7d8dec
parent2c388dabd2bd5b405e4cb21780a3abcba53ce873
mgr,pybind/mgr: add OSDMap.build_simple() method

to ease the testing

a typical session looks like:

[mgr self-test eval] >>> osdmap = OSDMap.build_simple(epoch=1, num_osd=2)
[mgr self-test eval] >>> osdmap
<mgr_module.OSDMap object at 0x7f0d201c0b00>

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/PyOSDMap.cc
src/pybind/mgr/ceph_module.pyi
src/pybind/mgr/mgr_module.py