blob: e4cad7d690acf6de1f4b9f3c93840f6484ee3ea0 [file] [log] [blame]
andreaed976a42015-10-05 14:38:25 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
andreaed976a42015-10-05 14:38:25 -07003 *
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 */
16
17package org.onosproject.ovsdb.controller.driver;
18
19import com.fasterxml.jackson.databind.JsonNode;
20import com.google.common.util.concurrent.ListenableFuture;
lishuai6c56f5e2015-11-17 16:38:19 +080021
andreaed976a42015-10-05 14:38:25 -070022import org.onlab.packet.IpAddress;
23import org.onosproject.net.DeviceId;
24import org.onosproject.net.behaviour.ControllerInfo;
Pier Ventref5d72362016-07-17 12:02:14 +020025import org.onosproject.net.behaviour.MirroringStatistics;
26import org.onosproject.net.behaviour.MirroringName;
andreaed976a42015-10-05 14:38:25 -070027import org.onosproject.ovsdb.controller.OvsdbBridge;
28import org.onosproject.ovsdb.controller.OvsdbClientService;
Hyunsun Moondd14e8e2016-06-09 16:17:32 -070029import org.onosproject.ovsdb.controller.OvsdbInterface;
Pier Ventref5d72362016-07-17 12:02:14 +020030import org.onosproject.ovsdb.controller.OvsdbMirror;
andreaed976a42015-10-05 14:38:25 -070031import org.onosproject.ovsdb.controller.OvsdbNodeId;
32import org.onosproject.ovsdb.controller.OvsdbPort;
andreaed976a42015-10-05 14:38:25 -070033import org.onosproject.ovsdb.rfc.message.TableUpdates;
34import org.onosproject.ovsdb.rfc.notation.Row;
andreaed976a42015-10-05 14:38:25 -070035import org.onosproject.ovsdb.rfc.operations.Operation;
36import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
37
38import java.util.List;
Hyunsun Moon646d8c42015-10-08 20:32:44 -070039import java.util.Map;
andreaed976a42015-10-05 14:38:25 -070040import java.util.Set;
41
42/**
43 * Test Adapter for OvsdbClientService.
44 */
45public class OvsdbClientServiceAdapter implements OvsdbClientService {
46
47 @Override
48 public OvsdbNodeId nodeId() {
49 return null;
50 }
51
Pier Ventref5d72362016-07-17 12:02:14 +020052 /**
53 * Creates a mirror port. Mirrors the traffic
54 * that goes to selectDstPort or comes from
55 * selectSrcPort or packets containing selectVlan
56 * to mirrorPort or to all ports that trunk mirrorVlan.
57 *
58 * @param bridgeName the name of the bridge
59 * @param mirror the OVSDB mirror description
60 * @return true if mirror creation is successful, false otherwise
61 */
62 @Override
63 public boolean createMirror(String bridgeName, OvsdbMirror mirror) {
64 return true;
65 }
66
67 /**
68 * Gets the Mirror uuid.
69 *
70 * @param mirrorName mirror name
71 * @return mirror uuid, empty if no uuid is found
72 */
73 @Override
74 public String getMirrorUuid(String mirrorName) {
75 return null;
76 }
77
78 /**
79 * Gets mirroring statistics of the device.
80 *
81 * @param deviceId target device id
82 * @return set of mirroring statistics; empty if no mirror is found
83 */
84 @Override
85 public Set<MirroringStatistics> getMirroringStatistics(DeviceId deviceId) {
86 return null;
87 }
88
89
90 /**
91 * Drops the configuration for mirror.
92 *
93 * @param mirroringName
94 */
95 @Override
96 public void dropMirror(MirroringName mirroringName) {
97
98 }
99
andreaed976a42015-10-05 14:38:25 -0700100 @Override
Hyunsun Moon646d8c42015-10-08 20:32:44 -0700101 public boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options) {
102 return true;
103 }
104
105 @Override
andreaed976a42015-10-05 14:38:25 -0700106 public void dropTunnel(IpAddress srcIp, IpAddress dstIp) {
andreaed976a42015-10-05 14:38:25 -0700107 }
108
109 @Override
Hyunsun Moondd14e8e2016-06-09 16:17:32 -0700110 public boolean createInterface(String bridgeName, OvsdbInterface ovsdbIface) {
111 return true;
112 }
113
114 @Override
115 public boolean dropInterface(String name) {
116 return true;
andreaed976a42015-10-05 14:38:25 -0700117 }
118
119 @Override
120 public void createBridge(String bridgeName) {
andreaed976a42015-10-05 14:38:25 -0700121 }
122
123 @Override
Hyunsun Moon646d8c42015-10-08 20:32:44 -0700124 public boolean createBridge(String bridgeName, String dpid, List<ControllerInfo> controllers) {
125 return true;
126 }
127
128 @Override
Hyunsun Moon1251e192016-06-07 16:57:05 -0700129 public boolean createBridge(OvsdbBridge ovsdbBridge) {
130 return true;
131 }
132
133 @Override
andreaed976a42015-10-05 14:38:25 -0700134 public void dropBridge(String bridgeName) {
andreaed976a42015-10-05 14:38:25 -0700135 }
136
137 @Override
138 public Set<OvsdbBridge> getBridges() {
139 return null;
140 }
141
142 @Override
143 public Set<ControllerInfo> getControllers(DeviceId openflowDeviceId) {
144 return null;
145 }
146
147 @Override
Hyunsun Moon1251e192016-06-07 16:57:05 -0700148 public ControllerInfo localController() {
149 return null;
150 }
151
152 @Override
andreaed976a42015-10-05 14:38:25 -0700153 public void setControllersWithDeviceId(DeviceId deviceId, List<ControllerInfo> controllers) {
154
155 }
156
157 @Override
158 public void createPort(String bridgeName, String portName) {
159
160 }
161
162 @Override
163 public void dropPort(String bridgeName, String portName) {
164
165 }
166
167 @Override
168 public Set<OvsdbPort> getPorts() {
169 return null;
170 }
171
172 @Override
173 public boolean isConnected() {
174 return false;
175 }
176
177 @Override
178 public String getBridgeUuid(String bridgeName) {
179 return null;
180 }
181
182 @Override
183 public String getPortUuid(String portName, String bridgeUuid) {
184 return null;
185 }
186
187 @Override
andreaed976a42015-10-05 14:38:25 -0700188 public ListenableFuture<DatabaseSchema> getOvsdbSchema(String dbName) {
189 return null;
190 }
191
192 @Override
193 public ListenableFuture<TableUpdates> monitorTables(String dbName, String id) {
194 return null;
195 }
196
197 @Override
andreaed976a42015-10-05 14:38:25 -0700198 public DatabaseSchema getDatabaseSchema(String dbName) {
199 return null;
200 }
201
202 @Override
203 public Row getRow(String dbName, String tableName, String uuid) {
204 return null;
205 }
206
207 @Override
208 public void removeRow(String dbName, String tableName, String uuid) {
209
210 }
211
212 @Override
213 public void updateOvsdbStore(String dbName, String tableName, String uuid, Row row) {
214
215 }
216
217 @Override
218 public Set<OvsdbPort> getLocalPorts(Iterable<String> ifaceids) {
219 return null;
220 }
221
222 @Override
223 public void disconnect() {
224
225 }
226
227 @Override
228 public ListenableFuture<JsonNode> getSchema(List<String> dbnames) {
229 return null;
230 }
231
232 @Override
233 public ListenableFuture<List<String>> echo() {
234 return null;
235 }
236
237 @Override
238 public ListenableFuture<JsonNode> monitor(DatabaseSchema dbSchema, String monitorId) {
239 return null;
240 }
241
242 @Override
243 public ListenableFuture<List<String>> listDbs() {
244 return null;
245 }
246
247 @Override
248 public ListenableFuture<List<JsonNode>> transact(DatabaseSchema dbSchema, List<Operation> operations) {
249 return null;
250 }
lishuai6c56f5e2015-11-17 16:38:19 +0800251
252 @Override
253 public void createBridge(String bridgeName, String dpid, String exPortName) {
254
255 }
andreaed976a42015-10-05 14:38:25 -0700256}