Skip to content

Commit 6d579f2

Browse files
committed
Updated schema docs and order of items
1 parent 9520cd3 commit 6d579f2

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

schemas/active-alarms-value.avsc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
"type": "record",
33
"name": "ActiveAlarm",
44
"namespace": "org.jlab.kafka.alarms",
5+
"doc": "Alarms currently alarming",
56
"fields": [
67
{
78
"name": "priority",
89
"type": {
910
"type": "enum",
1011
"name": "AlarmPriority",
11-
"doc": "Alarm severity organized as a way for operators to prioritize which alarms to take action on first",
12+
"doc": "Enumeration of possible alarm priorities",
1213
"symbols": [
1314
"P1_LIFE",
1415
"P2_PROPERTY",
1516
"P3_PRODUCTIVITY",
1617
"P4_DIAGNOSTIC"
1718
]
18-
}
19+
},
20+
"doc": "Alarm severity organized as a way for operators to prioritize which alarms to take action on first"
1921
},
2022
{
2123
"name": "acknowledged",

scripts/active-alarms/set-active.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,27 @@
1313

1414
value_schema_str = """
1515
{
16-
"namespace" : "org.jlab.kafka.alarms",
17-
"name" : "ActiveAlarm",
1816
"type" : "record",
17+
"name" : "ActiveAlarm",
18+
"namespace" : "org.jlab.kafka.alarms",
19+
"doc" : "Alarms currently alarming",
1920
"fields" : [
2021
{
2122
"name" : "priority",
2223
"type" : {
23-
"name" : "AlarmPriority",
24-
"type" : "enum",
25-
"symbols" : ["P1_LIFE","P2_PROPERTY","P3_PRODUCTIVITY", "P4_DIAGNOSTIC"],
26-
"doc" : "Alarm severity organized as a way for operators to prioritize which alarms to take action on first"
27-
}
24+
"type" : "enum",
25+
"name" : "AlarmPriority",
26+
"namespace" : "org.jlab.kafka.alarms",
27+
"doc" : "Enumeration of possible alarm priorities",
28+
"symbols" : ["P1_LIFE","P2_PROPERTY","P3_PRODUCTIVITY", "P4_DIAGNOSTIC"]
29+
},
30+
"doc" : "Alarm severity organized as a way for operators to prioritize which alarms to take action on first"
2831
},
2932
{
3033
"name" : "acknowledged",
3134
"type" : "boolean",
32-
"default" : false,
33-
"doc" : "Indicates whether this alarm has been explicitly acknowledged - useful for latching alarms which can only be cleared after acknowledgement"
35+
"doc" : "Indicates whether this alarm has been explicitly acknowledged - useful for latching alarms which can only be cleared after acknowledgement",
36+
"default" : false
3437
}
3538
]
3639
}

0 commit comments

Comments
 (0)