pyocf: Fix core.reset_stats()

Signed-off-by: Roel Apfelbaum <roel.apfelbaum@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Roel Apfelbaum 2022-05-23 07:58:15 -04:00 committed by Michal Mielewczyk
parent f729887938
commit b8ea10f30c

View File

@ -172,7 +172,7 @@ class Core:
raise OcfError("Error setting core seq cut off policy promotion count", status) raise OcfError("Error setting core seq cut off policy promotion count", status)
def reset_stats(self): def reset_stats(self):
self.cache.owner.lib.ocf_core_stats_initialize(self.handle) lib.ocf_core_stats_initialize(self.handle)
lib = OcfLib.getInstance() lib = OcfLib.getInstance()
@ -192,3 +192,5 @@ lib.ocf_stats_collect_core.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c
lib.ocf_stats_collect_core.restype = c_int lib.ocf_stats_collect_core.restype = c_int
lib.ocf_core_get_info.argtypes = [c_void_p, c_void_p] lib.ocf_core_get_info.argtypes = [c_void_p, c_void_p]
lib.ocf_core_get_info.restype = c_int lib.ocf_core_get_info.restype = c_int
lib.ocf_core_stats_initialize.argtypes = [c_void_p]
lib.ocf_core_stats_initialize.restype = c_void_p