blob: 8dc0928867bd71521f3567dbe8200b5f0bfdcea4 [file] [log] [blame]
Daniele Moro8d630f12021-06-15 20:53:22 +02001/*
2 * Copyright 2021-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 */
16
17package org.onosproject.pipelines.fabric.impl.behaviour.upf;
18
19import com.google.common.collect.Queues;
20import org.onosproject.core.ApplicationId;
21import org.onosproject.net.DeviceId;
22import org.onosproject.net.flow.TrafficSelector;
23import org.onosproject.net.packet.OutboundPacket;
24import org.onosproject.net.packet.PacketPriority;
25import org.onosproject.net.packet.PacketProcessor;
26import org.onosproject.net.packet.PacketProcessorEntry;
27import org.onosproject.net.packet.PacketRequest;
28import org.onosproject.net.packet.PacketService;
29
30import java.util.List;
31import java.util.Optional;
32import java.util.Queue;
33
34public class MockPacketService implements PacketService {
35
36 Queue<OutboundPacket> emittedPackets = Queues.newArrayDeque();
37
38 @Override
39 public void addProcessor(PacketProcessor processor, int priority) {
40
41 }
42
43 @Override
44 public void removeProcessor(PacketProcessor processor) {
45
46 }
47
48 @Override
49 public List<PacketProcessorEntry> getProcessors() {
50 return null;
51 }
52
53 @Override
54 public void requestPackets(TrafficSelector selector, PacketPriority priority, ApplicationId appId) {
55
56 }
57
58 @Override
59 public void requestPackets(TrafficSelector selector, PacketPriority priority,
60 ApplicationId appId, Optional<DeviceId> deviceId) {
61
62 }
63
64 @Override
65 public void cancelPackets(TrafficSelector selector, PacketPriority priority, ApplicationId appId) {
66
67 }
68
69 @Override
70 public void cancelPackets(TrafficSelector selector, PacketPriority priority,
71 ApplicationId appId, Optional<DeviceId> deviceId) {
72
73 }
74
75 @Override
76 public List<PacketRequest> getRequests() {
77 return null;
78 }
79
80 @Override
81 public void emit(OutboundPacket packet) {
82 emittedPackets.add(packet);
83 }
84}
85
86