]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: correct annotation for BasePyOSDMap._apply_incremental()
authorKefu Chai <kchai@redhat.com>
Tue, 19 Jan 2021 06:49:07 +0000 (14:49 +0800)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 29 Jan 2021 12:42:38 +0000 (13:42 +0100)
it's incorrect. as the underlying C implementation,
"osdmap_apply_incremental()", actually expects an instance of
`BasePyOSDMapIncrementalType`. which is mapped to
`BasePyOSDMapIncremental` in Python. and this class is wrapped using
`OSDMapIncremental` in mgr_module.py.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7b2dd7eba4422338acd5e6d8e24f88114f8694e6)

src/pybind/mgr/ceph_module.pyi

index dfa4a3dff440d3992a7afc614d176cabebe43f76..c0390908a36203d61152e5c954203a1032a6c59e 100644 (file)
@@ -7,7 +7,7 @@ class BasePyOSDMap(object):
     def _get_crush_version(self): ...
     def _dump(self):...
     def _new_incremental(self):...
-    def _apply_incremental(self, inc:int):...
+    def _apply_incremental(self, inc: 'BasePyOSDMapIncremental'):...
     def _get_crush(self):...
     def _get_pools_by_take(self, take):...
     def _calc_pg_upmaps(self, inc, max_deviation, max_iterations, pool):...