2 * Copyright (c) 2020 AT&T Intellectual Property.
3 * Copyright (c) 2020 Nokia.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 * platform project (RICP).
30 // Severity for alarms
33 // Possible values for Severity
35 SeverityUnspecified Severity = "UNSPECIFIED"
36 SeverityCritical Severity = "CRITICAL"
37 SeverityMajor Severity = "MAJOR"
38 SeverityMinor Severity = "MINOR"
39 SeverityWarning Severity = "WARNING"
40 SeverityCleared Severity = "CLEARED"
41 SeverityDefault Severity = "DEFAULT"
44 // Alarm object - see README for more information
46 ManagedObjectId string `json:"managedObjectId"`
47 ApplicationId string `json:"applicationId"`
48 SpecificProblem int `json:"specificProblem"`
49 PerceivedSeverity Severity `json:"perceivedSeverity"`
50 AdditionalInfo string `json:"additionalInfo"`
51 IdentifyingInfo string `json:"identifyingInfo"`
55 type AlarmAction string
57 // Possible values for alarm actions
59 AlarmActionRaise AlarmAction = "RAISE"
60 AlarmActionClear AlarmAction = "CLEAR"
61 AlarmActionClearAll AlarmAction = "CLEARALL"
64 type AlarmMessage struct {
70 // RICAlarm is an alarm instance
71 type RICAlarm struct {
81 RIC_ALARM_UPDATE = 13111
82 RIC_ALARM_QUERY = 13112
85 // Temp alarm constants & definitions
87 RIC_RT_DISTRIBUTION_FAILED int = 8004
88 TCP_CONNECTIVITY_LOST_TO_DBAAS int = 8005
89 E2_CONNECTIVITY_LOST_TO_GNODEB int = 8006
90 E2_CONNECTIVITY_LOST_TO_ENODEB int = 8007
93 type AlarmDefinition struct {
97 OperationInstructions string
100 var RICAlarmDefinitions = map[int]AlarmDefinition{
101 RIC_RT_DISTRIBUTION_FAILED: {
102 AlarmId: RIC_RT_DISTRIBUTION_FAILED,
103 AlarmText: "RIC ROUTING TABLE DISTRIBUTION FAILED",
104 EventType: "Processing error",
105 OperationInstructions: "Not defined",
107 TCP_CONNECTIVITY_LOST_TO_DBAAS: {
108 AlarmId: TCP_CONNECTIVITY_LOST_TO_DBAAS,
109 AlarmText: "TCP CONNECTIVITY LOST TO DBAAS",
110 EventType: "Communication error",
111 OperationInstructions: "Not defined",
113 E2_CONNECTIVITY_LOST_TO_GNODEB: {
114 AlarmId: E2_CONNECTIVITY_LOST_TO_GNODEB,
115 AlarmText: "E2 CONNECTIVITY LOST TO G-NODEB",
116 EventType: "Communication error",
117 OperationInstructions: "Not defined",
119 E2_CONNECTIVITY_LOST_TO_ENODEB: {
120 AlarmId: E2_CONNECTIVITY_LOST_TO_ENODEB,
121 AlarmText: "E2 CONNECTIVITY LOST TO E-NODEB",
122 EventType: "Communication error",
123 OperationInstructions: "Not defined",
128 ALARM_MANAGER_HTTP_URL string = "http://service-ricplt-alarmmanager-http.ricplt:8080"
129 ALARM_MANAGER_RMR_URL string = "service-ricplt-alarmmanager-rmr.ricplt:4560"