summaryrefslogtreecommitdiff
path: root/python/samba/gp_parse/__init__.py
AgeCommit message (Collapse)AuthorFilesLines
2023-06-23python:samba:gp_parse: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-10-02python2 reduction: Merge remaining compat code into commonDavid Mulder1-1/+1
The remaining compat code (get_string, get_bytes, cmp) are useful helper routines which we should simply merge into common (especially since there is some duplication here). Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): David Mulder <dmulder@samba.org> Autobuild-Date(master): Fri Oct 2 14:49:36 UTC 2020 on sn-devel-184
2018-11-05python/samba/gp_parse: PY3 file -> openNoel Power1-1/+1
'file' no longer exists in PY3 replace with 'open' Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-11-05python/samba/gp_parse: PY2/PY3 compat changes for __init__.pyNoel Power1-5/+7
Fixes. 1) sorting of xml.etree.ElementTree.Element, in PY2 sort seems to sort lists of these. In PY3 this no longer works. Choosing tag as the sort key for py3 so at least in python3 there is a consistent sort (probably won't match how it is sorted in PY2 but nothing seems to depend on that) 2) md5 requires bytes 3) tostring returns bytes in PY3, adjust code for that Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-16fdeploy_ini: Generalize the share name SIDsGarming Sam1-5/+6
This overrides the custom entity handler defined in the top level parser. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_parse: Add a generalize XML function to the top level parserGarming Sam1-1/+126
In this function we take XML and using the required metadata, we rewrite it into a generic form using entities. ElementTree unfortunately does not allow us to store unescaped entities, and so we must do a textual replace on the output XML. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_parse: Introduce new module for parsing GPO filesGarming Sam1-0/+57
This is the default parser which will cause the file to be restored as-is -- leaving only an effectively blank XML file as a placeholder. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>