blob: 2ea39b31126ca551bb0b19e7314af1668fff8569 [file] [log] [blame]
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +09003 *
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 /**
Hyunsun Moonf9a16ed2016-07-20 21:59:48 -070038 * Returns the uplink port number of the gateway with the supplied device ID.
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090039 *
Hyunsun Moonf9a16ed2016-07-20 21:59:48 -070040 * @param deviceId the gateway node device id
41 * @return the external interface port number
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090042 */
Hyunsun Moonf9a16ed2016-07-20 21:59:48 -070043 PortNumber getUplinkPort(DeviceId deviceId);
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090044
45 /**
46 * Returns group id for gateway load balance.
Hyunsun Moonf9a16ed2016-07-20 21:59:48 -070047 * If the group does not exist in the supplied source device, creates one.
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090048 *
Hyunsun Moon71701292016-05-09 12:00:54 -070049 * @param srcDeviceId source device id
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090050 * @return The group id
51 */
Hyunsun Moonf9a16ed2016-07-20 21:59:48 -070052 GroupId getGatewayGroupId(DeviceId srcDeviceId);
Kyuhwi Choic5b33ea2016-04-26 11:45:32 +090053
54 /**
55 * Returns the list of gateway node information with the given device identifier.
56 *
57 * @return The list of gateway node information
58 */
59 List<GatewayNode> getGatewayNodes();
60
61 /**
62 * Returns the list of gateway`s device identifiers.
63 *
64 * @return The list of device identifier]
65 */
66 List<DeviceId> getGatewayDeviceIds();
67
68 /**
69 * Adds gateway node in scalableGW application.
70 *
71 * @param gatewayNode Target gateway node
72 * @return Result of method call
73 */
74 boolean addGatewayNode(GatewayNode gatewayNode);
75
76 /**
77 * Removes gateway node in scalableGW application.
78 *
79 * @param gatewayNode Target gateway node
80 * @return Result of method call
81 */
82 boolean deleteGatewayNode(GatewayNode gatewayNode);
83}