Minor fix to get_metrics
authorSimon Kollberg <simonkollberg@gmail.com>
Wed, 30 Nov 2016 08:21:39 +0000 (09:21 +0100)
committerSimon Kollberg <simonkollberg@gmail.com>
Wed, 30 Nov 2016 08:26:20 +0000 (09:26 +0100)
json -> dict

juju/model.py

index 50b3ad0..df72eb2 100644 (file)
@@ -1261,7 +1261,7 @@ class Model(object):
                     raise Exception(error.message)
 
             for metric in entity_metrics.metrics:
-                metrics[metric.unit].append(metric.to_json())
+                metrics[metric.unit].append(vars(metric))
 
         return metrics