]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/tests/functional/pyocf/types/cleaner.py
2 # Copyright(c) 2019 Intel Corporation
3 # SPDX-License-Identifier: BSD-3-Clause-Clear
6 from ctypes
import c_void_p
, CFUNCTYPE
, Structure
, c_int
7 from .shared
import SharedOcfObject
10 class CleanerOps(Structure
):
11 INIT
= CFUNCTYPE(c_int
, c_void_p
)
12 KICK
= CFUNCTYPE(None, c_void_p
)
13 STOP
= CFUNCTYPE(None, c_void_p
)
15 _fields_
= [("init", INIT
), ("kick", KICK
), ("stop", STOP
)]
18 class Cleaner(SharedOcfObject
):
20 _fields_
= [("cleaner", c_void_p
)]
23 self
._as
_parameter
_ = self
.cleaner
28 return CleanerOps(init
=cls
._init
, kick
=cls
._kick
, stop
=cls
._stop
)