xref: /spdk/test/sma/plugins/plugin1/__init__.py (revision 20e3fb368767f1c1a54ca982659359ea1f8df2bf)
1from spdk.sma import DeviceManager
2from spdk.sma.proto import sma_pb2
3
4
5class TestDeviceManager1(DeviceManager):
6    def __init__(self, client):
7        super().__init__('plugin1-device1', 'nvme', client)
8
9    def create_device(self, request):
10        return sma_pb2.CreateDeviceResponse(handle=f'{self.protocol}:{self.name}')
11
12
13class TestDeviceManager2(DeviceManager):
14    def __init__(self, client):
15        super().__init__('plugin1-device2', 'nvmf_tcp', client)
16
17    def create_device(self, request):
18        return sma_pb2.CreateDeviceResponse(handle=f'{self.protocol}:{self.name}')
19
20
21devices = [TestDeviceManager1, TestDeviceManager2]
22