Pier Luigi | bdcd967 | 2017-10-13 13:54:48 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-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 | |
| 17 | package org.onosproject.net.behaviour.trafficcontrol; |
| 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | import org.onosproject.net.driver.HandlerBehaviour; |
| 21 | |
| 22 | import java.util.Collection; |
| 23 | |
| 24 | /** |
| 25 | * Behaviour for handling various drivers for policer configurations. |
| 26 | */ |
| 27 | @Beta |
| 28 | public interface PolicerConfigurable extends HandlerBehaviour { |
| 29 | |
| 30 | /** |
| 31 | * Allocates a new policer id. There may not be any correspondence with the identifiers |
| 32 | * of the technology implementing the Policer in the device. Mapping (if necessary) is left |
| 33 | * to the specific implementation. |
| 34 | * |
| 35 | * @return the policer id or {@link PolicerId#NONE} if there is a failure |
| 36 | */ |
| 37 | PolicerId allocatePolicerId(); |
| 38 | |
| 39 | /** |
| 40 | * Free a policer id. There may not be any correspondence with the identifiers |
| 41 | * of the technology implementing the Policer in the device. Mapping (if necessary) is left |
| 42 | * to the specific implementation. |
| 43 | * |
| 44 | * @param id the policer id |
| 45 | */ |
| 46 | void freePolicerId(PolicerId id); |
| 47 | |
| 48 | // Still WIP, throws NotImplementedException |
| 49 | void addPolicer(Policer policer); |
| 50 | |
| 51 | // Still WIP, throws NotImplementedException |
| 52 | void deletePolicer(PolicerId id); |
| 53 | |
| 54 | // Still WIP, throws NotImplementedException |
| 55 | Policer getPolicer(PolicerId policerId); |
| 56 | |
| 57 | // Still WIP, throws NotImplementedException |
| 58 | Collection<Policer> getPolicers(); |
| 59 | |
| 60 | } |