blob: 076ed36490609dcf695fb8e87ea263dcf60259f1 [file] [log] [blame]
Charles Chan7f987c52018-07-31 18:22:46 -07001/*
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 */
16package org.onosproject.l2lb.api;
17
18import org.onosproject.net.DeviceId;
19import org.onosproject.net.PortNumber;
20
21import java.util.Set;
22
23/**
24 * LACP admin service.
25 */
26public interface L2LbAdminService {
27 /**
28 * Creates or updates a L2 load balancer.
29 *
30 * @param deviceId Device ID
31 * @param key L2 load balancer key
32 * @param ports physical ports in the L2 load balancer
33 * @param mode L2 load balancer mode
34 * @return L2 load balancer that is created or updated
35 */
36 L2Lb createOrUpdate(DeviceId deviceId, int key, Set<PortNumber> ports, L2LbMode mode);
37
38 /**
39 * Removes a L2 load balancer.
40 *
41 * @param deviceId Device ID
42 * @param key L2 load balancer key
43 * @return L2 load balancer that is removed
44 */
45 L2Lb remove(DeviceId deviceId, int key);
46
47}