X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcore%2Fmodels.py;h=ca25d8ba0a3b4b9e2b0d3101368a8aeb58391f7b;hb=517bd7ef3b32561a6a3dd25ca383bcd40da263e6;hp=1810c9b2fc32836b24b312a1b0c5c67ff741ef93;hpb=1b7145f6d0d3c0090b7a33b4972861ad9ed48631;p=osm%2FMON.git diff --git a/osm_mon/core/models.py b/osm_mon/core/models.py index 1810c9b..ca25d8b 100644 --- a/osm_mon/core/models.py +++ b/osm_mon/core/models.py @@ -44,7 +44,8 @@ class Alarm: 'threshold': self.threshold, 'statistic': self.statistic, 'metric': self.metric, - 'tags': self.tags + 'tags': self.tags, + 'operation': self.operation } return alarm @@ -54,8 +55,9 @@ class Alarm: alarm.uuid = data.get('uuid', str(uuid.uuid4())) alarm.name = data.get('name') alarm.severity = data.get('severity') - alarm.threshold = data.get('threshold') + alarm.threshold = float(data.get('threshold')) alarm.statistic = data.get('statistic') alarm.metric = data.get('metric') alarm.tags = data.get('tags') + alarm.operation = data.get('operation') return alarm