Merge "Optimize cm-handle registration with CPS-DMI Plugin to upload yang model"
[ccsdk/features.git] / sdnr / wt / devicemanager-o-ran-sc / o-ran / ru-fh / provider / src / test / java / org / onap / ccsdk / features / sdnr / wt / devicemanager / oran / impl / binding / TestAlarmNotif.java
1 /*
2  * ============LICENSE_START=======================================================
3  * ONAP : ccsdk features
4  * ================================================================================
5  * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
6  * All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  */
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.oran.impl.binding;
23
24 import java.util.Map;
25 import org.eclipse.jdt.annotation.NonNull;
26 import org.eclipse.jdt.annotation.Nullable;
27 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
28 import org.opendaylight.yang.gen.v1.urn.o.ran.fm._1._0.rev190204.AlarmNotif;
29 import org.opendaylight.yang.gen.v1.urn.o.ran.fm._1._0.rev190204.alarm.AffectedObjects;
30 import org.opendaylight.yang.gen.v1.urn.o.ran.fm._1._0.rev190204.alarm.AffectedObjectsKey;
31 import org.opendaylight.yangtools.yang.binding.Augmentation;
32 import org.opendaylight.yangtools.yang.common.Uint16;
33
34 public class TestAlarmNotif implements AlarmNotif {
35
36     private static final Uint16 FAULT_ID = Uint16.valueOf(123);
37
38     @Override
39     public <A extends Augmentation<AlarmNotif>> @Nullable A augmentation(Class<A> augmentationType) {
40         return null;
41     }
42
43     @Override
44     public @Nullable Uint16 getFaultId() {
45         return FAULT_ID;
46     }
47
48     @Override
49     public @Nullable String getFaultSource() {
50         return "ORAN-RU-FH";
51     }
52
53     @Override
54     public @Nullable Map<AffectedObjectsKey, AffectedObjects> getAffectedObjects() {
55         return null;
56     }
57
58     @Override
59     public @Nullable FaultSeverity getFaultSeverity() {
60         return FaultSeverity.CRITICAL;
61     }
62
63     public @Nullable Boolean isIsCleared() {
64         return true;
65     }
66
67     @Override
68     public @Nullable String getFaultText() {
69         return "CPRI Port Down";
70     }
71
72     @Override
73     public @Nullable DateAndTime getEventTime() {
74         return new DateAndTime("2021-03-23T18:19:42.326144Z");
75     }
76
77     @Override
78     public @NonNull Map<Class<? extends Augmentation<AlarmNotif>>, Augmentation<AlarmNotif>> augmentations() {
79         // TODO Auto-generated method stub
80         return null;
81     }
82
83     @Override
84     public Boolean getIsCleared() {
85         return true;
86     }
87
88 }