Jian Li | 3e70d8a | 2018-03-28 13:56:41 +0900 | [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 | package org.onosproject.openstacknetworking.impl; |
| 17 | |
| 18 | import com.google.common.collect.ImmutableSet; |
| 19 | import org.onlab.packet.IpAddress; |
| 20 | import org.onlab.packet.MacAddress; |
Jian Li | 6343020 | 2018-08-30 16:24:09 +0900 | [diff] [blame] | 21 | import org.onosproject.net.DeviceId; |
| 22 | import org.onosproject.net.PortNumber; |
Jian Li | 3e70d8a | 2018-03-28 13:56:41 +0900 | [diff] [blame] | 23 | import org.onosproject.openstacknetworking.api.InstancePort; |
| 24 | import org.onosproject.openstacknetworking.api.InstancePortListener; |
| 25 | import org.onosproject.openstacknetworking.api.InstancePortService; |
| 26 | |
| 27 | import java.util.Set; |
| 28 | |
| 29 | /** |
| 30 | * Test adapter for instance port service. |
| 31 | */ |
| 32 | public class InstancePortServiceAdapter implements InstancePortService { |
| 33 | @Override |
| 34 | public InstancePort instancePort(MacAddress macAddress) { |
| 35 | return null; |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public InstancePort instancePort(IpAddress ipAddress, String osNetId) { |
| 40 | return null; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public InstancePort instancePort(String osPortId) { |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | @Override |
Jian Li | 6343020 | 2018-08-30 16:24:09 +0900 | [diff] [blame] | 49 | public InstancePort instancePort(DeviceId deviceId, PortNumber portNumber) { |
| 50 | return null; |
| 51 | } |
| 52 | |
| 53 | @Override |
Jian Li | 3e70d8a | 2018-03-28 13:56:41 +0900 | [diff] [blame] | 54 | public Set<InstancePort> instancePorts() { |
| 55 | return ImmutableSet.of(); |
| 56 | } |
| 57 | |
| 58 | @Override |
| 59 | public Set<InstancePort> instancePorts(String osNetId) { |
| 60 | return ImmutableSet.of(); |
| 61 | } |
| 62 | |
| 63 | @Override |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 64 | public IpAddress floatingIp(String osPortId) { |
| 65 | return null; |
| 66 | } |
| 67 | |
| 68 | @Override |
Jian Li | 3e70d8a | 2018-03-28 13:56:41 +0900 | [diff] [blame] | 69 | public void addListener(InstancePortListener listener) { |
| 70 | |
| 71 | } |
| 72 | |
| 73 | @Override |
| 74 | public void removeListener(InstancePortListener listener) { |
| 75 | |
| 76 | } |
| 77 | } |