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