Skip to content

Commit ff7e920

Browse files
committed
Merge pull request #1 from rdobson/dmidecode
Adding code for parsing dmidecode output.
2 parents 66b0d1d + 3583bc1 commit ff7e920

File tree

4 files changed

+744
-0
lines changed

4 files changed

+744
-0
lines changed

hwinfo/host/__init__.py

Whitespace-only changes.

hwinfo/host/dmidecode.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Module for host related info"""
2+
3+
from hwinfo.util import CommandParser
4+
5+
class DmidecodeParser(CommandParser):
6+
7+
ITEM_REGEXS = [
8+
# BIOS Info
9+
r'BIOS\ Information\n(.)*Vendor:\ (?P<bios_vendor_name>.*)\n',
10+
r'BIOS\ Information\n(.)*\n\tVersion:\ (?P<bios_version>.*)\n',
11+
r'BIOS\ Information\n(.)*\n(.)*\n\tRelease\ Date:\ (?P<bios_release_date>.*)\n',
12+
# System Info
13+
r'System\ Information\n\tManufacturer:\ (?P<system_manufacturer>.*)\n',
14+
r'System\ Information\n(.)*\n\tProduct\ Name:\ (?P<system_product_name>.*)\n',
15+
r'System\ Information\n(.)*\n(.)*\n(.)*\n\tSerial\ Number:\ (?P<system_serial_number>.*)\n',
16+
r'System\ Information\n(.)*\n(.)*\n(.)*\n(.)*\n\tUUID:\ (?P<system_uuid>.*)\n',
17+
]
18+
19+

0 commit comments

Comments
 (0)