| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Also preparing/cleaning-up example/test-case script.
|
|
|
|
|
|
|
|
|
|
|
| |
The version is of now, v3.10.6. The version major field has been
upped due to the newly added XML functionality.
The version has been reverted to GPLv2.
Some headers have been cleaned up, copyright notices added etc.
Credits given where due.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
to maintain backwards compatibility
The old python-dmidecode uses the format '{flag} ({description})'. This
format is now used is well as contents for the cpu_flags/flag text nodes.
|
| |
|
| |
|
| |
|
|
|
|
| |
/dmidecode/SystemSlots/SlotCharacteristics/Characteristic/@index
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This builds up a list of dicts. Syntax is:
<Map keytype="constant" key="TestData"
valuetype="list:dict" value="/xml/XPath/to/nodes">
<Map keytype="constant" key="field"
valuetype="string" key="ValueNode"/>
</Map>
The parser will iterate all nodes defined in the @value attribute
and the root path will of the nested mapping will be using the path
in @value as the root path for further parsing.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These hangover lines must have crept in at the early stages of the
initial conversion of dmidecode to python-dmidecode. Fixed.
|
|
|
|
|
|
| |
This part of the XML result was not valid due to duplicated tag attributes.
Moved some of this specifications from the SystemSlots tag to its own
SlotID tag, with even more details.
|
| |
|
|
|
|
| |
Fixes regression in parsing introduced when rewriting dmidecode to use libxml2
|
|
|
|
|
| |
This attribute defines a default value when XML source data
is empty
|
| |
|
|
|
|
|
|
|
|
| |
If the emptyIsNone attribute is set to "1", the Python result
will be forced to Py_None if the referenced XML value is empty.
When checking if the value is empty, the XML value is right trimmed
to remove trailing spaces. Only spaces are are removed.
|
|
|
|
|
|
|
|
|
| |
When using one of the list types as valuetype, the Map tag now
also supports fixedsize and index_attr attributes.
- fixedsize : Defines a fixed size of the list
- index_attr : Defines an attribute name of the input XML data
which contains the list index for the value
|
|
|
|
|
| |
When using rootpath, it did not parse all elements as expected. Also
restricted the rootpath to only work when valuetype="dict".
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Supports relative XPaths now by using the rootpath attribute in the
Map tag. This path is then set for all elements inside this Map tag.
- Rewrote the parser to recurse correctly. The former version did not
recurse well on the very outer (first) Map level.
|
| |
|
|
|
|
| |
This is to preserve backwards compatibility
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The default file is now set to /usr/share/python-dmidecode/pythonmap.xml
(defined in config.h) and can be overridden with the dmidecode.pythonmap()
function in Python.
|
|
|
|
|
|
|
|
| |
When calling dmidecode_get_xml(...) several times could cause a crash
due to the opt.dmiversion_n pointer being freed by a mistake when the
generated dmixml_n got freed later on in the function.
Also fixed an assertion typo
|
| |
|
| |
|
|
|
|
|
| |
This rewrite was to handle XPATH_NUMBER more correctly. Now these
functions needs an preallocated memory buffer for the result.
|
| |
|
|
|
|
|
|
|
| |
Now the XPath expressions can include XPath functions as well. The
previous implementation only supported XPATH_NODESET results from
XPath queries. Now XPATH_STRING and XPATH_NUMBER results are
supported as well. XPATH_BOOLEAN might be needed later on.
|
|
|
|
| |
Reverted commit 75aaf67d43cf4a28fe8d3e07111dab75a0c4396d in addition
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 4b925a1433b65c217e787804df3cf349d6b387aa.
Discovered that XPath got the needed power for filtering, no need for
this extra feature
|
| |
|
|
|
|
| |
Only added mapping for the 'bios' section.
|
|
|
|
|
|
| |
Using these attributes, only XML data (from the given XPath in 'filter')
which matches the value in 'filtervalue' will be added to the Python
data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added support boolean and list:boolean value types
* Traversing child nodes and having dynamic keys
Now it is possible to do the following:
** test.xml **
<?xml version="1.0" encoding="UTF-8"?>
<testdata>
<list>
<value enabled="1">Option 1</value>
<value enabled="0">Option 2</value>
<value enabled="1">Option 3</value>
</list>
</testdata>
** mapping.xml **
<?xml version="1.0" encoding="UTF-8"?>
<dmidecode_fieldmap version="1">
<Mapping name="example">
<Map keytype="string" key="/testdata/list/value"
valuetype="boolean" value="/testdata/list/value/@enabled"/>
</Mapping>
</dmidecode_fieldmap>
Which should result in:
{'Option 1': True, 'Option 2': False, 'Option 3': True'}
|