2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.openroadm.test.mock;
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;
40 public class NetconfAccessorMock implements NetconfAccessor {
42 private final NodeId nNodeId;
43 private final NetconfNode netconfNode;
44 private final MountPoint mountpoint;
45 private final DataBroker netconfNodeDataBroker;
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;
56 public NodeId getNodeId() {
61 public NetconfNode getNetconfNode() {
66 public Capabilities getCapabilites() {
71 public DataBroker getDataBroker() {
72 return netconfNodeDataBroker;
76 public MountPoint getMountpoint() {
81 public TransactionUtils getTransactionUtils() {
86 public <T extends NotificationListener> ListenerRegistration<NotificationListener> doRegisterNotificationListener(
87 @NonNull T listener) {
92 public ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName) {