1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

split slot info

This commit is contained in:
Kelly Brazil
2022-10-12 09:07:17 -07:00
parent aa1ff55bbe
commit a53f2ecbaf
2 changed files with 23 additions and 0 deletions

View File

@ -104,6 +104,20 @@ def parse(
device_output = {} device_output = {}
device_output['slot'] = line.split()[1] device_output['slot'] = line.split()[1]
slot_info = line.split()[1]
*domain, bus, dev_fun = slot_info.split(':')
if domain:
dom = domain[0]
else:
dom = None
dev, fun = dev_fun.split('.')
device_output['domain'] = dom
device_output['bus'] = bus
device_output['dev'] = dev
device_output['function'] = fun
continue continue
key, val = line.split(maxsplit=1) key, val = line.split(maxsplit=1)

View File

@ -303,3 +303,12 @@ SDevice: SATA AHCI controller [07e0]
PhySlot: 37 PhySlot: 37
ProgIf: 01 ProgIf: 01
Slot: ff:02:05.0
Class: SATA controller [0106]
Vendor: VMware [15ad]
Device: SATA AHCI controller [07e0]
SVendor: VMware [15ad]
SDevice: SATA AHCI controller [07e0]
PhySlot: 37
ProgIf: 01