Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 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.device; |
| 18 | |
| 19 | import org.onosproject.net.Device; |
| 20 | import org.onosproject.net.DeviceId; |
| 21 | import org.onosproject.net.Port; |
| 22 | import org.onosproject.net.PortNumber; |
| 23 | import org.onosproject.net.provider.ProviderId; |
| 24 | |
| 25 | import java.util.Collection; |
| 26 | import java.util.List; |
Yuta HIGUCHI | 6eb00cc | 2016-06-10 11:55:12 -0700 | [diff] [blame] | 27 | import java.util.stream.Stream; |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Test adapter for the DeviceStore API. |
| 31 | */ |
| 32 | public class DeviceStoreAdapter implements DeviceStore { |
| 33 | @Override |
| 34 | public int getDeviceCount() { |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public Iterable<Device> getDevices() { |
| 40 | return null; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public Iterable<Device> getAvailableDevices() { |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public Device getDevice(DeviceId deviceId) { |
| 50 | return null; |
| 51 | } |
| 52 | |
| 53 | @Override |
| 54 | public DeviceEvent createOrUpdateDevice(ProviderId providerId, DeviceId deviceId, |
| 55 | DeviceDescription deviceDescription) { |
| 56 | return null; |
| 57 | } |
| 58 | |
| 59 | @Override |
helenyrwu | fd296b6 | 2016-06-22 17:43:02 -0700 | [diff] [blame] | 60 | public boolean markOnline(DeviceId deviceId) { |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | @Override |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 65 | public DeviceEvent markOffline(DeviceId deviceId) { |
| 66 | return null; |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | public List<DeviceEvent> updatePorts(ProviderId providerId, DeviceId deviceId, |
| 71 | List<PortDescription> portDescriptions) { |
| 72 | return null; |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId, |
| 77 | PortDescription portDescription) { |
| 78 | return null; |
| 79 | } |
| 80 | |
| 81 | @Override |
| 82 | public List<Port> getPorts(DeviceId deviceId) { |
| 83 | return null; |
| 84 | } |
| 85 | |
| 86 | @Override |
Yuta HIGUCHI | 6eb00cc | 2016-06-10 11:55:12 -0700 | [diff] [blame] | 87 | public Stream<PortDescription> getPortDescriptions(ProviderId providerId, |
| 88 | DeviceId deviceId) { |
| 89 | return Stream.empty(); |
| 90 | } |
| 91 | |
| 92 | @Override |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 93 | public DeviceEvent updatePortStatistics(ProviderId providerId, DeviceId deviceId, |
| 94 | Collection<PortStatistics> portStats) { |
| 95 | return null; |
| 96 | } |
| 97 | |
| 98 | @Override |
| 99 | public List<PortStatistics> getPortStatistics(DeviceId deviceId) { |
| 100 | return null; |
| 101 | } |
| 102 | |
| 103 | @Override |
Viswanath KSP | 22774cd | 2016-08-20 20:06:30 +0530 | [diff] [blame] | 104 | public PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber) { |
| 105 | return null; |
| 106 | } |
| 107 | |
| 108 | @Override |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 109 | public List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId) { |
| 110 | return null; |
| 111 | } |
| 112 | |
| 113 | @Override |
Viswanath KSP | 22774cd | 2016-08-20 20:06:30 +0530 | [diff] [blame] | 114 | public PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber) { |
| 115 | return null; |
| 116 | } |
| 117 | |
| 118 | @Override |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 119 | public Port getPort(DeviceId deviceId, PortNumber portNumber) { |
| 120 | return null; |
| 121 | } |
| 122 | |
| 123 | @Override |
Yuta HIGUCHI | 6eb00cc | 2016-06-10 11:55:12 -0700 | [diff] [blame] | 124 | public PortDescription getPortDescription(ProviderId providerId, |
| 125 | DeviceId deviceId, |
| 126 | PortNumber portNumber) { |
| 127 | return null; |
| 128 | } |
| 129 | |
| 130 | @Override |
Andrea Campanella | 58454b9 | 2016-04-01 15:19:00 -0700 | [diff] [blame] | 131 | public boolean isAvailable(DeviceId deviceId) { |
| 132 | return false; |
| 133 | } |
| 134 | |
| 135 | @Override |
| 136 | public DeviceEvent removeDevice(DeviceId deviceId) { |
| 137 | return null; |
| 138 | } |
| 139 | |
| 140 | @Override |
| 141 | public void setDelegate(DeviceStoreDelegate delegate) { |
| 142 | |
| 143 | } |
| 144 | |
| 145 | @Override |
| 146 | public void unsetDelegate(DeviceStoreDelegate delegate) { |
| 147 | |
| 148 | } |
| 149 | |
| 150 | @Override |
| 151 | public boolean hasDelegate() { |
| 152 | return false; |
| 153 | } |
| 154 | } |