nodedev: Remove unused USBBus parsing

This commit is contained in:
Cole Robinson 2019-06-05 15:40:09 -04:00
parent b7ac99473d
commit cf3bc3eb3b
2 changed files with 1 additions and 20 deletions

View File

@ -138,15 +138,6 @@ class TestNodeDev(unittest.TestCase):
"media_available": True, "media_size": 12345678}
self._testCompare(devname, vals)
def testUSBBus(self):
devname = "usb_device_1d6b_1_0000_00_1d_1_if0"
vals = {"name": "usb_device_1d6b_1_0000_00_1d_1_if0",
"parent": "usb_device_1d6b_1_0000_00_1d_1",
"device_type": NodeDevice.CAPABILITY_TYPE_USBBUS,
"number": "0", "classval": "9", "subclass": "0",
"protocol": "0"}
self._testCompare(devname, vals)
def testSCSIBus(self):
devname = "pci_8086_2829_scsi_host_1"
vals = {"name": "pci_8086_2829_scsi_host_1",

View File

@ -36,7 +36,6 @@ class NodeDevice(XMLBuilder):
CAPABILITY_TYPE_NET = "net"
CAPABILITY_TYPE_PCI = "pci"
CAPABILITY_TYPE_USBDEV = "usb_device"
CAPABILITY_TYPE_USBBUS = "usb"
CAPABILITY_TYPE_STORAGE = "storage"
CAPABILITY_TYPE_SCSIBUS = "scsi_host"
CAPABILITY_TYPE_SCSIDEV = "scsi"
@ -266,13 +265,6 @@ class StorageDevice(NodeDevice):
return desc
class USBBus(NodeDevice):
number = XMLProperty("./capability/number")
classval = XMLProperty("./capability/class")
subclass = XMLProperty("./capability/subclass")
protocol = XMLProperty("./capability/protocol")
class SCSIDevice(NodeDevice):
host = XMLProperty("./capability/host")
bus = XMLProperty("./capability/bus")
@ -368,9 +360,7 @@ def _AddressStringToNodedev(conn, addrstr):
def _typeToDeviceClass(t):
if t == NodeDevice.CAPABILITY_TYPE_USBBUS:
return USBBus
elif t == NodeDevice.CAPABILITY_TYPE_STORAGE:
if t == NodeDevice.CAPABILITY_TYPE_STORAGE:
return StorageDevice
elif t == NodeDevice.CAPABILITY_TYPE_SCSIBUS:
return SCSIBus