summaryrefslogtreecommitdiffstats
path: root/unit-tests/dmidecode.py
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-06-10 11:43:56 +0200
committerDavid Sommerseth <davids@redhat.com>2009-06-10 11:43:56 +0200
commitb25b2ca548508cd2beb26f465b7bc5a296592461 (patch)
tree8c6db01b6ac2bd22baa6b6be1de6382244c471f9 /unit-tests/dmidecode.py
parentb6d42c742d89dda95cc6e371f0fda6bf1d385a45 (diff)
downloadpython-dmidecode-b25b2ca548508cd2beb26f465b7bc5a296592461.tar.gz
python-dmidecode-b25b2ca548508cd2beb26f465b7bc5a296592461.tar.xz
python-dmidecode-b25b2ca548508cd2beb26f465b7bc5a296592461.zip
Implemented native libxml2 XML API for dmidecode
To use this API, you need to import dmidecodeXML. This is a wrapper class for the internal XML API which has been implemented. In addition, you might also want to import libxml2 as well. dmidecodeXML::QuerySection(<string>) Valid section strings can be found in the pymap.xml file, in the <GroupMapping> tag section. dmidecodeXML::TypeId(<integer between 0-255>) Valid values should match the DMI/SMBIOS specification. dmidecodeXML::SetResultType(resultType) Result type can be either dmidecodeXML.DMIXML_NODE or dmidecodeXML.DMIXML_DOC ---------------------------------------------------------- import libxml2 import dmidecodeXML dmixml = dmidecodeXML.dmidecodeXML() section_nodes = dmixml.QuerySection('processor') dmixml.SetResultType(dmidecodeXML.DMIXML_DOC) typeid_doc = dmixml.QueryTypeId(0x10) dmixml.SetResultType(dmidecodeXML.DMIXML_NODE) typeid_doc.saveFormatFileEnc("-", "UTF-8", 1) ----------------------------------------------------------
Diffstat (limited to 'unit-tests/dmidecode.py')
0 files changed, 0 insertions, 0 deletions