Added cache mode change in pyocf and basic test

This commit is contained in:
Kamil Lepek
2019-04-09 15:43:57 +02:00
parent f9c22262fb
commit 5ceb69e9c8
2 changed files with 34 additions and 0 deletions

View File

@@ -160,6 +160,11 @@ class Cache:
if status:
raise OcfError("Error setting management queue", status)
def change_cache_mode(self, cache_mode: CacheMode):
self.get_and_write_lock()
self.owner.lib.ocf_mngt_cache_set_mode(self.cache_handle, cache_mode)
self.put_and_write_unlock()
def configure_device(
self, device, force=False, perform_test=False, cache_line_size=None
):