d8a175036a389e2960ad84661d80b91fad06b1bc
[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 package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
19
20 import org.eclipse.jdt.annotation.NonNull;
21 import org.eclipse.jdt.annotation.Nullable;
22 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
23 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
26 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
27
28 /**
29  *
30  */
31 public interface FaultService extends DeviceManagerService {
32
33     /**
34      * Notify fault information to devicemanager
35      * 
36      * @param faultNotification to send
37      */
38     void faultNotification(@NonNull FaultlogEntity faultNotification);
39
40     /**
41      * Fault notification
42      * 
43      * @param nodeId of node
44      * @param counter provided
45      * @param timeStamp provided
46      * @param objectId provided
47      * @param problem provided
48      * @param severity provided
49      */
50     void faultNotification(@NonNull NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
51             @Nullable String objectId, @Nullable String problem, @Nullable SeverityType severity);
52
53     /**
54      * Remove current problems of node
55      * 
56      * @param nodeId of node
57      * @return number of removed entries
58      */
59     int removeAllCurrentProblemsOfNode(@NonNull NodeId nodeId);
60
61     /**
62      * Write initial list of problems of node
63      * 
64      * @param nodeId of node
65      * @param resultList
66      */
67     void initCurrentProblemStatus(@NonNull NodeId nodeId, FaultData resultList);
68
69     /**
70      * @param nodeId of node
71      * @param objectId of element to be removed
72      * @return number of removed items
73      */
74     int removeObjectsCurrentProblemsOfNode(@NonNull NodeId nodeId, @NonNull String objectId);
75
76 }