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