8a0694087ef7eeecd2c4f7c7a3cae275e12b5b0c
[ccsdk/features.git] /
1 /*
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt
4  * =================================================================================================
5  * Copyright (C) 2020 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.adaptermanager.test.mock;
19
20 import com.google.common.util.concurrent.ListenableFuture;
21 import java.util.List;
22 import java.util.Optional;
23
24 import org.eclipse.jdt.annotation.NonNull;
25 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
26 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
27 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
28 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
29 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
30 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
31 import org.opendaylight.mdsal.binding.api.DataBroker;
32 import org.opendaylight.mdsal.binding.api.MountPoint;
33 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionOutput;
34 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
36 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
37 import org.opendaylight.yangtools.concepts.ListenerRegistration;
38 import org.opendaylight.yangtools.yang.binding.NotificationListener;
39 import org.opendaylight.yangtools.yang.common.RpcResult;
40
41 /**
42  */
43 public class NetconfAccessorMock implements NetconfBindingAccessor, NetconfNotifications {
44
45     private final NodeId nNodeId;
46     private final NetconfNode netconfNode;
47     private final MountPoint mountpoint;
48     private final DataBroker netconfNodeDataBroker;
49
50     public NetconfAccessorMock(NodeId nNodeId, NetconfNode netconfNode, MountPoint mountpoint,
51             DataBroker netconfNodeDataBroker) {
52         this.nNodeId = nNodeId;
53         this.netconfNode = netconfNode;
54         this.mountpoint = mountpoint;
55         this.netconfNodeDataBroker = netconfNodeDataBroker;
56     }
57
58     @Override
59     public NodeId getNodeId() {
60         return nNodeId;
61     }
62
63     @Override
64     public NetconfNode getNetconfNode() {
65         return netconfNode;
66     }
67
68     @Override
69     public Capabilities getCapabilites() {
70         return null;
71     }
72
73     @Override
74     public DataBroker getDataBroker() {
75         return netconfNodeDataBroker;
76     }
77
78     @Override
79     public MountPoint getMountpoint() {
80         return mountpoint;
81     }
82
83     @Override
84     public TransactionUtils getTransactionUtils() {
85         return null;
86     }
87
88     @Override
89     public <T extends NotificationListener> ListenerRegistration<NotificationListener> doRegisterNotificationListener(
90             @NonNull T listener) {
91         return null;
92     }
93
94     @Override
95     public ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName) {
96         return null;
97     }
98
99     @Override
100     public void registerNotificationsStream(List<Stream> streamList) {
101         // TODO Auto-generated method stub
102
103     }
104
105     @Override
106     public boolean isNCNotificationsSupported() {
107         // TODO Auto-generated method stub
108         return false;
109     }
110
111     @Override
112     public List<Stream> getNotificationStreams() {
113         // TODO Auto-generated method stub
114         return null;
115     }
116
117         @Override
118         public Optional<NetconfBindingAccessor> getNetconfBindingAccessor() {
119                 // TODO Auto-generated method stub
120                 return null;
121         }
122
123         @Override
124         public Optional<NetconfDomAccessor> getNetconfDomAccessor() {
125                 // TODO Auto-generated method stub
126                 return null;
127         }
128
129         @Override
130         public Optional<NetconfNotifications> getNotificationAccessor() {
131                 // TODO Auto-generated method stub
132                 return null;
133         }
134
135         @Override
136         public boolean isNotificationsSupported() {
137                 // TODO Auto-generated method stub
138                 return false;
139         }
140
141 }