Modify

Ticket #987 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

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

comment:1 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

Patch applied in a839ccf5223d7839526448a02bfb558fe7f70500. Thanks again!

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.