From b4dd5dac00c952f468115916018c92b8b34b7fcf Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 8 Jun 2022 21:25:54 +0200 Subject: [PATCH] pyocf: methods to get ocf_volume_t from cache/core exp obj vol Signed-off-by: Adam Rutkowski --- tests/functional/pyocf/types/cache.py | 10 ++++++++-- tests/functional/pyocf/types/core.py | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/functional/pyocf/types/cache.py b/tests/functional/pyocf/types/cache.py index ab32f33..2d15a09 100644 --- a/tests/functional/pyocf/types/cache.py +++ b/tests/functional/pyocf/types/cache.py @@ -759,10 +759,16 @@ class Cache: self.cores.remove(core) def get_front_volume(self): - return Volume.get_instance(lib.ocf_cache_get_front_volume(self.cache_handle)) + return Volume.get_instance(self.get_c_front_volume()) + + def get_c_front_volume(self): + return lib.ocf_cache_get_front_volume(self.cache_handle) def get_volume(self): - return Volume.get_instance(lib.ocf_cache_get_volume(self.cache_handle)) + return Volume.get_instance(self.get_c_volume()) + + def get_c_volume(self): + return lib.ocf_cache_get_volume(self.cache_handle) def get_conf(self): cache_info = CacheInfo() diff --git a/tests/functional/pyocf/types/core.py b/tests/functional/pyocf/types/core.py index 7f5c93b..0ea11e4 100644 --- a/tests/functional/pyocf/types/core.py +++ b/tests/functional/pyocf/types/core.py @@ -97,10 +97,16 @@ class Core: return self.handle def get_front_volume(self): - return Volume.get_instance(lib.ocf_core_get_front_volume(self.handle)) + return Volume.get_instance(self.get_c_front_volume()) + + def get_c_front_volume(self): + return lib.ocf_core_get_front_volume(self.handle) def get_volume(self): - return Volume.get_instance(lib.ocf_core_get_volume(self.handle)) + return Volume.get_instance(self.get_c_volume()) + + def get_c_volume(self): + return lib.ocf_core_get_volume(self.handle) def get_default_queue(self): return self.cache.get_default_queue()