use lshw for inventory #58

Merged
ThomasADavis merged 15 commits from lshw-inventory into master 2019-09-05 15:13:37 +02:00
Showing only changes of commit 93bef02a6c - Show all commits

View file

@ -9,13 +9,20 @@ def is_tool(name):
def get_vendor(name): def get_vendor(name):
vendors = { vendors = {
'ST': 'Seagate', 'ST': 'Seagate',
'Crucial': 'Crucial', 'CRUCIAL': 'Crucial',
'Micron': 'Micron', 'MICRON': 'Micron',
'Intel': 'Intel', 'INTEL': 'Intel',
'Samsung': 'Samsung', 'SAMSUNG': 'Samsung',
'EH0': 'HP',
'HGST': 'HGST', 'HGST': 'HGST',
'HUH': 'HGST',
'MB': 'Toshiba',
'MC': 'Toshiba',
'MD': 'Toshiba',
'MG': 'Toshiba',
'WD': 'WDC'
} }
for key, value in vendors.items(): for key, value in vendors.items():
if name.startswith(key): if name.upper().startswith(key):
return value return value
return name return name