Modify ↓
Ticket #987 (closed defect: fixed)
probed.xml should be deterministically ordered, take 2
Reported by: | http://faceted.wordpress.com/ | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
My patch in #982 should have sorted the nested elements also:
@@ -75,10 +75,10 @@ top = lxml.etree.Element("Probed") for client, probed in sorted(self.probedata.items()): cx = lxml.etree.SubElement(top, 'Client', name=client) - for probe in probed: + for probe in sorted(probed): lxml.etree.SubElement(cx, 'Probe', name=probe, value=self.probedata[client][probe]) - for group in self.cgroups[client]: + for group in sorted(self.cgroups[client]): lxml.etree.SubElement(cx, "Group", name=group) data = lxml.etree.tostring(top, encoding='UTF-8', xml_declaration=True, pretty_print='true')
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
Patch applied in a839ccf5223d7839526448a02bfb558fe7f70500. Thanks again!