1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2023 PANTHEON.tech s.r.o. 3 4"""Virtual devices model. 5 6Alongside support for physical hardware, DPDK can create various virtual devices. 7""" 8 9 10class VirtualDevice: 11 """Base class for virtual devices used by DPDK. 12 13 Attributes: 14 name: The name of the virtual device. 15 """ 16 17 name: str 18 19 def __init__(self, name: str): 20 """Initialize the virtual device. 21 22 Args: 23 name: The name of the virtual device. 24 """ 25 self.name = name 26 27 def __str__(self) -> str: 28 """This corresponds to the name used for DPDK devices.""" 29 return self.name 30