blob: a399d9278d11c8a4e43ad8d1270baa73df406a7b [file] [log] [blame]
Yuta HIGUCHI8810aa42017-08-02 15:05:37 -07001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.netconf;
17
18import java.util.List;
19import java.util.concurrent.CompletableFuture;
20
21import org.onlab.util.Tools;
22
23/**
24 * Adapter mainly intended for usage in tests.
25 */
26public class NetconfSessionAdapter implements NetconfSession {
27
28 @Override
29 public void startSubscription(String filterSchema) throws NetconfException {
30 }
31
32 @Override
33 public void startSubscription() throws NetconfException {
34 }
35
36 @Override
37 public void setDeviceCapabilities(List<String> capabilities) {
38 }
39
40 @Override
41 public String requestSync(String request) throws NetconfException {
42 return null;
43 }
44
45 @Override
46 public CompletableFuture<String> request(String request)
47 throws NetconfException {
48 return Tools.exceptionalFuture(new UnsupportedOperationException());
49 }
50
51 @Override
52 public void removeDeviceOutputListener(NetconfDeviceOutputEventListener listener) {
53 }
54
55 @Override
56 public String getSessionId() {
57 return null;
58 }
59
60 @Override
61 public String getServerCapabilities() {
62 return null;
63 }
64
65 @Override
66 public String get(String filterSchema, String withDefaultsMode)
67 throws NetconfException {
68 return null;
69 }
70
71 @Override
72 public String get(String request) throws NetconfException {
73 return null;
74 }
75
76 @Override
77 public void endSubscription() throws NetconfException {
78 }
79
80 @Override
81 public boolean editConfig(String newConfiguration) throws NetconfException {
82 return true;
83 }
84
85 @Override
86 public String doWrappedRpc(String request) throws NetconfException {
87 return null;
88 }
89
90 @Override
91 public boolean copyConfig(String netconfTargetConfig,
92 String newConfiguration)
93 throws NetconfException {
94 return true;
95 }
96
97 @Override
98 public boolean close() throws NetconfException {
99 return true;
100 }
101
102 @Override
103 public void addDeviceOutputListener(NetconfDeviceOutputEventListener listener) {
104 }
105}