Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311382

Change subject: naggen2: order resources by title in puppetDB as well
......................................................................

naggen2: order resources by title in puppetDB as well

Change-Id: Iebc821b9adf465fb48115b23543c56f6ce8fe7b0
---
M modules/puppetmaster/files/naggen2
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/311382/1

diff --git a/modules/puppetmaster/files/naggen2 
b/modules/puppetmaster/files/naggen2
index 3eba6f4..3594fb2 100755
--- a/modules/puppetmaster/files/naggen2
+++ b/modules/puppetmaster/files/naggen2
@@ -135,11 +135,15 @@
             self.config.get('main', 'port'),
             self.restype[what]
         )
-        resources_raw = requests.get(url, params={'query': '["=", 
["parameter", "ensure"], "present"]'})
+        resources_raw = requests.get(url, params={
+            'query': '["=", ["parameter", "ensure"], "present"]',
+            'order-by': '[{"field": :title""}]'
+        })
         return resources_raw.json()
 
     def _filter_entity(self, entity, what):
         name = entity['certname']
+        entity['parameters'].sort()
         params = [p for p in entity['parameters'].iteritems() if p[0] not in 
['ensure', 'target']]
         # PuppetDB 2.3 does not collect the host_name parameter, apparently
         if what in ['hosts', 'hostextinfo']:

-- 
To view, visit https://gerrit.wikimedia.org/r/311382
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebc821b9adf465fb48115b23543c56f6ce8fe7b0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to