projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 10339 - Enhanced Alarm Mgmt. (SOL005 FM Interface)
[osm/MON.git]
/
osm_mon
/
core
/
models.py
diff --git
a/osm_mon/core/models.py
b/osm_mon/core/models.py
index
8fe3b6b
..
48fe8c4
100644
(file)
--- a/
osm_mon/core/models.py
+++ b/
osm_mon/core/models.py
@@
-32,7
+32,9
@@
class Alarm:
operation: str = None,
statistic: str = None,
metric: str = None,
operation: str = None,
statistic: str = None,
metric: str = None,
+ action: str = None,
tags: dict = {},
tags: dict = {},
+ alarm_status: str = "ok",
):
self.uuid = str(uuid.uuid4())
self.name = name
):
self.uuid = str(uuid.uuid4())
self.name = name
@@
-41,7
+43,9
@@
class Alarm:
self.operation = operation
self.statistic = statistic
self.metric = metric
self.operation = operation
self.statistic = statistic
self.metric = metric
+ self.action = action
self.tags = tags
self.tags = tags
+ self.alarm_status = alarm_status
def to_dict(self) -> dict:
alarm = {
def to_dict(self) -> dict:
alarm = {
@@
-53,6
+57,7
@@
class Alarm:
"metric": self.metric,
"tags": self.tags,
"operation": self.operation,
"metric": self.metric,
"tags": self.tags,
"operation": self.operation,
+ "alarm_status": self.alarm_status,
}
return alarm
}
return alarm
@@
-67,4
+72,5
@@
class Alarm:
alarm.metric = data.get("metric")
alarm.tags = data.get("tags")
alarm.operation = data.get("operation")
alarm.metric = data.get("metric")
alarm.tags = data.get("tags")
alarm.operation = data.get("operation")
+ alarm.alarm_status = data.get("alarm_status")
return alarm
return alarm