Kyuhwi Choi | c5b33ea | 2016-04-26 11:45:32 +0900 | [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 | */ |
Hyunsun Moon | 7170129 | 2016-05-09 12:00:54 -0700 | [diff] [blame] | 16 | package org.onosproject.scalablegateway.api; |
Kyuhwi Choi | c5b33ea | 2016-04-26 11:45:32 +0900 | [diff] [blame] | 17 | |
| 18 | import org.onosproject.core.GroupId; |
| 19 | import org.onosproject.net.DeviceId; |
| 20 | import org.onosproject.net.PortNumber; |
| 21 | |
| 22 | import java.util.List; |
| 23 | |
| 24 | /** |
| 25 | * ScalableGateWay Service Interface. |
| 26 | */ |
| 27 | public interface ScalableGatewayService { |
| 28 | |
| 29 | /** |
| 30 | * Returns gateway node with the given device identifier. |
| 31 | * |
| 32 | * @param deviceId The gateway node deviceId |
| 33 | * @return The gateway node information |
| 34 | */ |
| 35 | GatewayNode getGatewayNode(DeviceId deviceId); |
| 36 | |
| 37 | /** |
| 38 | * Returns the list of gateway`s port numbers with the given device identifier. |
| 39 | * |
| 40 | * @param deviceId The gateway node deviceId |
| 41 | * @return The list of external interface port number |
| 42 | */ |
| 43 | List<PortNumber> getGatewayExternalPorts(DeviceId deviceId); |
| 44 | |
| 45 | /** |
| 46 | * Returns group id for gateway load balance. |
| 47 | * |
Hyunsun Moon | 7170129 | 2016-05-09 12:00:54 -0700 | [diff] [blame] | 48 | * @param srcDeviceId source device id |
Kyuhwi Choi | c5b33ea | 2016-04-26 11:45:32 +0900 | [diff] [blame] | 49 | * @return The group id |
| 50 | */ |
| 51 | GroupId getGroupIdForGatewayLoadBalance(DeviceId srcDeviceId); |
| 52 | |
| 53 | /** |
| 54 | * Returns the list of gateway node information with the given device identifier. |
| 55 | * |
| 56 | * @return The list of gateway node information |
| 57 | */ |
| 58 | List<GatewayNode> getGatewayNodes(); |
| 59 | |
| 60 | /** |
| 61 | * Returns the list of gateway`s device identifiers. |
| 62 | * |
| 63 | * @return The list of device identifier] |
| 64 | */ |
| 65 | List<DeviceId> getGatewayDeviceIds(); |
| 66 | |
| 67 | /** |
| 68 | * Adds gateway node in scalableGW application. |
| 69 | * |
| 70 | * @param gatewayNode Target gateway node |
| 71 | * @return Result of method call |
| 72 | */ |
| 73 | boolean addGatewayNode(GatewayNode gatewayNode); |
| 74 | |
| 75 | /** |
| 76 | * Removes gateway node in scalableGW application. |
| 77 | * |
| 78 | * @param gatewayNode Target gateway node |
| 79 | * @return Result of method call |
| 80 | */ |
| 81 | boolean deleteGatewayNode(GatewayNode gatewayNode); |
| 82 | } |