]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/telemetry: change crash dict to a list
authorDan Mick <dan.mick@redhat.com>
Wed, 17 Apr 2019 04:02:11 +0000 (21:02 -0700)
committerDan Mick <dan.mick@redhat.com>
Wed, 17 Apr 2019 04:02:11 +0000 (21:02 -0700)
For ease of indexing.  There's no value in timestamp keys.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/pybind/mgr/telemetry/module.py

index 99313a9c01fdc63129d8c803693a3e6b564a7216..a8d8abc75323c777410a390dd250f1245fdc737a 100644 (file)
@@ -171,7 +171,7 @@ class Module(MgrModule):
         return metadata
 
     def gather_crashinfo(self):
-        crashdict = dict()
+        crashlist = list()
         errno, crashids, err = self.remote('crash', 'do_ls', '', '')
         if errno:
             return ''
@@ -180,8 +180,8 @@ class Module(MgrModule):
             errno, crashinfo, err = self.remote('crash', 'do_info', cmd, '')
             if errno:
                 continue
-            crashdict[crashid] = json.loads(crashinfo)
-        return crashdict
+            crashlist.append(json.loads(crashinfo))
+        return crashlist
 
     def compile_report(self):
         report = {