812d4dcf3dcfc5041e376c4c1c5ba9f1a23cfe61
[ccsdk/features.git] /
1 /*******************************************************************************
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  ******************************************************************************/
18 /**
19  * Problems generated by DeviceMonitor
20  *
21  * @author herbert
22  *
23  */
24 package org.onap.ccsdk.features.sdnr.wt.devicemanager.devicemonitor.impl;
25
26 import javax.annotation.Nullable;
27
28 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.InternalSeverity;
29 import org.slf4j.Logger;
30 import org.slf4j.LoggerFactory;
31
32 public enum DeviceMonitorProblems {
33
34         /**
35          * Mountpoint is not connected via NETCONF with NE/Mediator = ssh connection
36          */
37     connectionLossOAM(InternalSeverity.Major),
38
39     /**
40      * Mountpoint is connected via Netconf to Mediator, but mediator is not responding.
41      * Connection state to NE is unknown.
42      */
43     connectionLossMediator(InternalSeverity.Major),
44
45     /** Mountpoint is connected via Netconf to Mediator.
46      * This connection is OK, but mediator <-> NE Connection is not OK
47      */
48     connectionLossNeOAM(InternalSeverity.Major);
49
50     private static final Logger LOG = LoggerFactory.getLogger(DeviceMonitorProblems.class);
51     InternalSeverity severity;
52
53     DeviceMonitorProblems(@Nullable InternalSeverity severity) {
54         if (severity != null) {
55                 this.severity = severity;
56         }
57     }
58
59     InternalSeverity getSeverity() {
60         return severity;
61     }
62
63         public void setSeverity(InternalSeverity severity) {
64                 LOG.info("Change severity for {} from {} to {}", name(), this.severity, severity);
65                 this.severity=severity;
66         }
67
68 }
69