Carmelo Cascone | 0761cd3 | 2018-08-29 19:22:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-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 | |
| 17 | package org.onosproject.net.pi; |
| 18 | |
| 19 | import org.onosproject.net.DeviceId; |
| 20 | import org.onosproject.net.pi.model.PiPipeconf; |
| 21 | import org.onosproject.net.pi.model.PiPipeconfId; |
Carmelo Cascone | 75a9a89 | 2019-04-22 12:12:23 -0700 | [diff] [blame] | 22 | import org.onosproject.net.pi.service.PiPipeconfListener; |
Carmelo Cascone | 0761cd3 | 2018-08-29 19:22:50 -0700 | [diff] [blame] | 23 | import org.onosproject.net.pi.service.PiPipeconfService; |
| 24 | |
| 25 | import java.util.Collections; |
| 26 | import java.util.Optional; |
| 27 | |
| 28 | /** |
| 29 | * Test adapter of PiPipeconfService. |
| 30 | */ |
| 31 | public class PiPipeconfServiceAdapter implements PiPipeconfService { |
| 32 | @Override |
| 33 | public void register(PiPipeconf pipeconf) throws IllegalStateException { |
| 34 | |
| 35 | } |
| 36 | |
| 37 | @Override |
Carmelo Cascone | 75a9a89 | 2019-04-22 12:12:23 -0700 | [diff] [blame] | 38 | public void unregister(PiPipeconfId pipeconfId) throws IllegalStateException { |
Carmelo Cascone | 0761cd3 | 2018-08-29 19:22:50 -0700 | [diff] [blame] | 39 | |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public Iterable<PiPipeconf> getPipeconfs() { |
| 44 | return Collections.emptyList(); |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public Optional<PiPipeconf> getPipeconf(PiPipeconfId id) { |
| 49 | return Optional.empty(); |
| 50 | } |
| 51 | |
| 52 | @Override |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 53 | public Optional<PiPipeconf> getPipeconf(DeviceId deviceId) { |
| 54 | return Optional.empty(); |
| 55 | } |
| 56 | |
| 57 | @Override |
Carmelo Cascone | 0761cd3 | 2018-08-29 19:22:50 -0700 | [diff] [blame] | 58 | public void bindToDevice(PiPipeconfId pipeconfId, DeviceId deviceId) { |
| 59 | |
| 60 | } |
| 61 | |
| 62 | @Override |
| 63 | public String getMergedDriver(DeviceId deviceId, PiPipeconfId pipeconfId) { |
| 64 | return null; |
| 65 | } |
| 66 | |
| 67 | @Override |
| 68 | public Optional<PiPipeconfId> ofDevice(DeviceId deviceId) { |
| 69 | return Optional.empty(); |
| 70 | } |
Carmelo Cascone | 75a9a89 | 2019-04-22 12:12:23 -0700 | [diff] [blame] | 71 | |
| 72 | @Override |
| 73 | public void addListener(PiPipeconfListener listener) { |
| 74 | |
| 75 | } |
| 76 | |
| 77 | @Override |
| 78 | public void removeListener(PiPipeconfListener listener) { |
| 79 | |
| 80 | } |
Carmelo Cascone | 0761cd3 | 2018-08-29 19:22:50 -0700 | [diff] [blame] | 81 | } |