Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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.xosclient.api; |
| 17 | |
| 18 | import java.util.Set; |
| 19 | |
| 20 | /** |
| 21 | * Service for interacting with XOS VTN ports. |
| 22 | */ |
| 23 | public interface VtnPortApi { |
| 24 | |
| 25 | /** |
| 26 | * Returns all ports. |
| 27 | * |
| 28 | * @return set of ports |
| 29 | */ |
| 30 | Set<VtnPort> vtnPorts(); |
| 31 | |
| 32 | /** |
| 33 | * Returns all ports with a given service. |
| 34 | * |
| 35 | * @param serviceId service id |
| 36 | * @return set of ports |
| 37 | */ |
| 38 | Set<VtnPort> vtnPorts(VtnServiceId serviceId); |
| 39 | |
| 40 | /** |
| 41 | * Returns port information with port id. |
| 42 | * |
| 43 | * @param portId port id |
| 44 | * @return vtn port; null if it fails to get port information |
| 45 | */ |
| 46 | VtnPort vtnPort(VtnPortId portId); |
Hyunsun Moon | e0f3e28 | 2016-05-13 18:58:35 -0700 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Returns port information from OpenStack with port id. |
| 50 | * |
| 51 | * @param portId port id |
Ray Milkey | bb23e0b | 2016-08-02 17:00:21 -0700 | [diff] [blame] | 52 | * @param osAccess OpenStack address for OS access |
Hyunsun Moon | e0f3e28 | 2016-05-13 18:58:35 -0700 | [diff] [blame] | 53 | * @return vtn port; null if it fails to get port information |
| 54 | */ |
| 55 | // TODO remove this when XOS provides port information |
| 56 | VtnPort vtnPort(VtnPortId portId, OpenStackAccess osAccess); |
| 57 | |
| 58 | /** |
| 59 | * Returns port information from OpenStack with port name. |
| 60 | * |
| 61 | * @param portName port name |
Ray Milkey | bb23e0b | 2016-08-02 17:00:21 -0700 | [diff] [blame] | 62 | * @param osAccess OpenStack address for OS access |
Hyunsun Moon | e0f3e28 | 2016-05-13 18:58:35 -0700 | [diff] [blame] | 63 | * @return vtn port; null if it fails to get port information |
| 64 | */ |
| 65 | // TODO remove this when XOS provides port information |
| 66 | VtnPort vtnPort(String portName, OpenStackAccess osAccess); |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 67 | } |