pyocf: update cleaning policy switching test
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
a94677f433
commit
1620c544a1
@ -228,14 +228,16 @@ class Cache:
|
|||||||
def set_cleaning_policy(self, cleaning_policy: CleaningPolicy):
|
def set_cleaning_policy(self, cleaning_policy: CleaningPolicy):
|
||||||
self.write_lock()
|
self.write_lock()
|
||||||
|
|
||||||
status = self.owner.lib.ocf_mngt_cache_cleaning_set_policy(
|
c = OcfCompletion([("priv", c_void_p), ("error", c_int)])
|
||||||
self.cache_handle, cleaning_policy
|
self.owner.lib.ocf_mngt_cache_cleaning_set_policy(
|
||||||
|
self.cache_handle, cleaning_policy, c, None
|
||||||
)
|
)
|
||||||
|
c.wait()
|
||||||
|
|
||||||
self.write_unlock()
|
self.write_unlock()
|
||||||
|
|
||||||
if status:
|
if c.results["error"]:
|
||||||
raise OcfError("Error changing cleaning policy", status)
|
raise OcfError("Error changing cleaning policy", c.results["error"])
|
||||||
|
|
||||||
def set_cleaning_policy_param(
|
def set_cleaning_policy_param(
|
||||||
self, cleaning_policy: CleaningPolicy, param_id, param_value
|
self, cleaning_policy: CleaningPolicy, param_id, param_value
|
||||||
@ -704,8 +706,7 @@ lib.ocf_mngt_cache_remove_core.argtypes = [c_void_p, c_void_p, c_void_p]
|
|||||||
lib.ocf_mngt_cache_add_core.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p]
|
lib.ocf_mngt_cache_add_core.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p]
|
||||||
lib.ocf_cache_get_name.argtypes = [c_void_p]
|
lib.ocf_cache_get_name.argtypes = [c_void_p]
|
||||||
lib.ocf_cache_get_name.restype = c_char_p
|
lib.ocf_cache_get_name.restype = c_char_p
|
||||||
lib.ocf_mngt_cache_cleaning_set_policy.argtypes = [c_void_p, c_uint32]
|
lib.ocf_mngt_cache_cleaning_set_policy.argtypes = [c_void_p, c_uint32, c_void_p, c_void_p]
|
||||||
lib.ocf_mngt_cache_cleaning_set_policy.restype = c_int
|
|
||||||
lib.ocf_mngt_core_set_seq_cutoff_policy_all.argtypes = [c_void_p, c_uint32]
|
lib.ocf_mngt_core_set_seq_cutoff_policy_all.argtypes = [c_void_p, c_uint32]
|
||||||
lib.ocf_mngt_core_set_seq_cutoff_policy_all.restype = c_int
|
lib.ocf_mngt_core_set_seq_cutoff_policy_all.restype = c_int
|
||||||
lib.ocf_mngt_core_set_seq_cutoff_threshold_all.argtypes = [c_void_p, c_uint32]
|
lib.ocf_mngt_core_set_seq_cutoff_threshold_all.argtypes = [c_void_p, c_uint32]
|
||||||
|
Loading…
Reference in New Issue
Block a user