8b13b000f8d492ecbe47bbdf7aea002fa9611fae
[ccsdk/features.git] /
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.openroadm.test.mock;
23
24 import com.google.common.util.concurrent.ListenableFuture;
25 import org.eclipse.jdt.annotation.NonNull;
26 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
27 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
28 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
29 import org.opendaylight.mdsal.binding.api.DataBroker;
30 import org.opendaylight.mdsal.binding.api.MountPoint;
31 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionOutput;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
33 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
34 import org.opendaylight.yangtools.concepts.ListenerRegistration;
35 import org.opendaylight.yangtools.yang.binding.NotificationListener;
36 import org.opendaylight.yangtools.yang.common.RpcResult;
37
38 /**
39  */
40 public class NetconfAccessorMock implements NetconfAccessor {
41
42     private final NodeId nNodeId;
43     private final NetconfNode netconfNode;
44     private final MountPoint mountpoint;
45     private final DataBroker netconfNodeDataBroker;
46
47     public NetconfAccessorMock(NodeId nNodeId, NetconfNode netconfNode, MountPoint mountpoint,
48             DataBroker netconfNodeDataBroker) {
49         this.nNodeId = nNodeId;
50         this.netconfNode = netconfNode;
51         this.mountpoint = mountpoint;
52         this.netconfNodeDataBroker = netconfNodeDataBroker;
53     }
54
55     @Override
56     public NodeId getNodeId() {
57         return nNodeId;
58     }
59
60     @Override
61     public NetconfNode getNetconfNode() {
62         return netconfNode;
63     }
64
65     @Override
66     public Capabilities getCapabilites() {
67         return null;
68     }
69
70     @Override
71     public DataBroker getDataBroker() {
72         return netconfNodeDataBroker;
73     }
74
75     @Override
76     public MountPoint getMountpoint() {
77         return mountpoint;
78     }
79
80     @Override
81     public TransactionUtils getTransactionUtils() {
82         return null;
83     }
84
85     @Override
86     public <T extends NotificationListener> ListenerRegistration<NotificationListener> doRegisterNotificationListener(
87             @NonNull T listener) {
88         return null;
89     }
90
91     @Override
92     public ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName) {
93         return null;
94     }
95
96 }