From 232133302b223946338e0889c44f15520621eac2 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 2 Mar 2022 18:16:35 +0100 Subject: [PATCH] pyocf: use generic volume submit in io class .. instead of submit_core(). This will enable to reuse Io class for cache exported object I/O. Signed-off-by: Adam Rutkowski --- tests/functional/pyocf/types/io.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/functional/pyocf/types/io.py b/tests/functional/pyocf/types/io.py index dfc0471..0bfea6d 100644 --- a/tests/functional/pyocf/types/io.py +++ b/tests/functional/pyocf/types/io.py @@ -96,13 +96,13 @@ class Io(Structure): self.del_object() def submit(self): - return OcfLib.getInstance().ocf_core_submit_io_wrapper(byref(self)) + return OcfLib.getInstance().ocf_volume_submit_io(byref(self)) def submit_flush(self): - return OcfLib.getInstance().ocf_core_submit_flush_wrapper(byref(self)) + return OcfLib.getInstance().ocf_volume_submit_flush(byref(self)) def submit_discard(self): - return OcfLib.getInstance().ocf_core_submit_discard_wrapper(byref(self)) + return OcfLib.getInstance().ocf_volume_submit_discard(byref(self)) def set_data(self, data: Data, offset: int = 0): self.data = data @@ -122,3 +122,12 @@ lib.ocf_core_new_io_wrapper.restype = c_void_p lib.ocf_io_set_data.argtypes = [POINTER(Io), c_void_p, c_uint32] lib.ocf_io_set_data.restype = c_int + +lib.ocf_volume_submit_io.argtypes = [POINTER(Io)] +lib.ocf_volume_submit_io.restype = None + +lib.ocf_volume_submit_flush.argtypes = [POINTER(Io)] +lib.ocf_volume_submit_flush.restype = None + +lib.ocf_volume_submit_discard.argtypes = [POINTER(Io)] +lib.ocf_volume_submit_discard.restype = None