From 3f9af8bd821ce3ae0544e1be2b31fee32d478a63 Mon Sep 17 00:00:00 2001 From: Kozlowski Mateusz Date: Fri, 26 Mar 2021 08:56:15 +0100 Subject: [PATCH] Update pyocf types to new field order Signed-off-by: Kozlowski Mateusz --- tests/functional/pyocf/types/io.py | 4 ++-- tests/functional/pyocf/types/ioclass.py | 6 +++--- tests/functional/pyocf/types/stats/cache.py | 2 +- tests/functional/pyocf/types/volume.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/functional/pyocf/types/io.py b/tests/functional/pyocf/types/io.py index 3ea35b8..8a3daa8 100644 --- a/tests/functional/pyocf/types/io.py +++ b/tests/functional/pyocf/types/io.py @@ -43,10 +43,10 @@ class Io(Structure): ("_dir", c_uint32), ("_io_queue", c_void_p), ("_start", START), - ("_handle", HANDLE), - ("_end", END), ("_priv1", c_void_p), ("_priv2", c_void_p), + ("_handle", HANDLE), + ("_end", END), ] @classmethod diff --git a/tests/functional/pyocf/types/ioclass.py b/tests/functional/pyocf/types/ioclass.py index e5bafdb..908f281 100644 --- a/tests/functional/pyocf/types/ioclass.py +++ b/tests/functional/pyocf/types/ioclass.py @@ -23,10 +23,10 @@ class IoClassInfo(Structure): class IoClassConfig(Structure): _fields_ = [ ("_class_id", c_uint32), - ("_name", c_char_p), - ("_prio", c_uint16), - ("_cache_mode", c_int), ("_max_size", c_uint32), + ("_name", c_char_p), + ("_cache_mode", c_int), + ("_prio", c_uint16), ] diff --git a/tests/functional/pyocf/types/stats/cache.py b/tests/functional/pyocf/types/stats/cache.py index d4ef4ff..521416d 100644 --- a/tests/functional/pyocf/types/stats/cache.py +++ b/tests/functional/pyocf/types/stats/cache.py @@ -19,6 +19,7 @@ class CacheInfo(Structure): _fields_ = [ ("attached", c_bool), ("volume_type", c_uint8), + ("state", c_uint8), ("size", c_uint32), ("inactive", _Inactive), ("occupancy", c_uint32), @@ -27,7 +28,6 @@ class CacheInfo(Structure): ("dirty_for", c_uint64), ("cache_mode", c_uint32), ("fallback_pt", _FallbackPt), - ("state", c_uint8), ("eviction_policy", c_uint32), ("cleaning_policy", c_uint32), ("promotion_policy", c_uint32), diff --git a/tests/functional/pyocf/types/volume.py b/tests/functional/pyocf/types/volume.py index ae682a5..29bf090 100644 --- a/tests/functional/pyocf/types/volume.py +++ b/tests/functional/pyocf/types/volume.py @@ -53,8 +53,8 @@ class VolumeOps(Structure): ("_submit_write_zeroes", SUBMIT_WRITE_ZEROES), ("_open", OPEN), ("_close", CLOSE), - ("_get_max_io_size", GET_MAX_IO_SIZE), ("_get_length", GET_LENGTH), + ("_get_max_io_size", GET_MAX_IO_SIZE), ] @@ -64,9 +64,9 @@ class VolumeProperties(Structure): ("_io_priv_size", c_uint32), ("_volume_priv_size", c_uint32), ("_caps", VolumeCaps), - ("_ops", VolumeOps), ("_io_ops", IoOps), ("_deinit", c_char_p), + ("_ops", VolumeOps), ]