blob: d3d0f862ad8613397eea7bed4252a521c121b442 [file] [log] [blame]
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +09001/*
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 Moon71701292016-05-09 12:00:54 -070016package org.onosproject.scalablegateway.api;
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090017
18import org.onosproject.core.GroupId;
19import org.onosproject.net.DeviceId;
20import org.onosproject.net.PortNumber;
21
22import java.util.List;
23
24/**
25 * ScalableGateWay Service Interface.
26 */
27public 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 /**
Kyuhwi Choi176c83d2016-07-14 11:39:37 +090038 * Returns the gateway`s port number with the given device identifier.
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090039 *
40 * @param deviceId The gateway node deviceId
Kyuhwi Choi176c83d2016-07-14 11:39:37 +090041 * @return The external interface port number
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090042 */
Kyuhwi Choi176c83d2016-07-14 11:39:37 +090043 PortNumber getGatewayExternalPort(DeviceId deviceId);
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090044
45 /**
46 * Returns group id for gateway load balance.
47 *
Hyunsun Moon71701292016-05-09 12:00:54 -070048 * @param srcDeviceId source device id
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090049 * @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}