SDN-R add updated devicemanager
[ccsdk/features.git] / sdnr / wt / devicemanager / model / src / main / java / org / onap / ccsdk / features / sdnr / wt / devicemanager / service / FaultService.java
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     /** Notify fault information to devicemanager
34      * @param faultNotification to send
35      */
36     void faultNotification(@NonNull FaultlogEntity faultNotification);
37
38     /**
39      * Fault notification
40      * @param nodeId of node
41      * @param counter provided
42      * @param timeStamp provided
43      * @param objectId provided
44      * @param problem provided
45      * @param severity provided
46      */
47     void faultNotification(@NonNull NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp, @Nullable String objectId,
48             @Nullable String problem, @Nullable SeverityType severity);
49
50     /**
51      * Remove current problems of node
52      * @param nodeId of node
53      * @return number of removed entries
54      */
55     int removeAllCurrentProblemsOfNode(@NonNull NodeId nodeId);
56
57     /**
58      * Write initial list of problems of node
59      * @param nodeId of node
60      * @param resultList
61      */
62     void initCurrentProblemStatus(@NonNull NodeId nodeId, FaultData resultList);
63
64     /**
65      * @param nodeId of node
66      * @param objectId of element to be removed
67      * @return number of removed items
68      */
69     int removeObjectsCurrentProblemsOfNode(@NonNull NodeId nodeId, @NonNull String objectId);
70
71 }