Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding code for parsing dmidecode output.
Signed-off-by: Rob Dobson <[email protected]>
  • Loading branch information
rdobson committed Jun 20, 2014
commit 3583bc14feab9a811b9254a572c8f7f4e5996b80
Empty file added hwinfo/host/__init__.py
Empty file.
19 changes: 19 additions & 0 deletions hwinfo/host/dmidecode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Module for host related info"""

from hwinfo.util import CommandParser

class DmidecodeParser(CommandParser):

ITEM_REGEXS = [
# BIOS Info
r'BIOS\ Information\n(.)*Vendor:\ (?P<bios_vendor_name>.*)\n',
r'BIOS\ Information\n(.)*\n\tVersion:\ (?P<bios_version>.*)\n',
r'BIOS\ Information\n(.)*\n(.)*\n\tRelease\ Date:\ (?P<bios_release_date>.*)\n',
# System Info
r'System\ Information\n\tManufacturer:\ (?P<system_manufacturer>.*)\n',
r'System\ Information\n(.)*\n\tProduct\ Name:\ (?P<system_product_name>.*)\n',
r'System\ Information\n(.)*\n(.)*\n(.)*\n\tSerial\ Number:\ (?P<system_serial_number>.*)\n',
r'System\ Information\n(.)*\n(.)*\n(.)*\n(.)*\n\tUUID:\ (?P<system_uuid>.*)\n',
]


Loading