Charles Chan | f7b1b4b | 2019-01-16 15:30:39 -0800 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.portloadbalancer.api; |
| 17 | |
| 18 | import org.onosproject.net.PortNumber; |
| 19 | |
| 20 | import java.util.Set; |
| 21 | |
| 22 | /** |
| 23 | * Port load balancer admin service. |
| 24 | */ |
| 25 | public interface PortLoadBalancerAdminService { |
| 26 | /** |
| 27 | * Creates or updates a port load balancer. |
| 28 | * |
| 29 | * @param portLoadBalancerId port load balancer id |
| 30 | * @param ports physical ports in the port load balancer |
| 31 | * @param mode port load balancer mode |
| 32 | * @return port load balancer that is created or updated |
| 33 | */ |
| 34 | PortLoadBalancer createOrUpdate(PortLoadBalancerId portLoadBalancerId, Set<PortNumber> ports, |
| 35 | PortLoadBalancerMode mode); |
| 36 | |
| 37 | /** |
| 38 | * Removes a port load balancer. |
| 39 | * |
| 40 | * @param portLoadBalancerId port load balancer id |
| 41 | * @return port load balancer that is removed or null if it was not possible |
| 42 | */ |
| 43 | PortLoadBalancer remove(PortLoadBalancerId portLoadBalancerId); |
| 44 | |
| 45 | } |