Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 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.net.behaviour; |
| 17 | import com.google.common.annotations.Beta; |
| 18 | import org.onosproject.net.driver.HandlerBehaviour; |
| 19 | |
| 20 | import java.util.Collection; |
tanbangcheng | c944c28 | 2017-11-12 20:42:59 +0800 | [diff] [blame] | 21 | import java.util.List; |
| 22 | import java.util.Map; |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Behaviour for handling various operations for qos configurations. |
| 26 | */ |
| 27 | @Beta |
| 28 | public interface QosConfigBehaviour extends HandlerBehaviour { |
| 29 | |
| 30 | /** |
| 31 | * Obtain all qoses configured on a device. |
| 32 | * |
| 33 | * @return a set of qos descriptions |
| 34 | */ |
| 35 | Collection<QosDescription> getQoses(); |
| 36 | |
| 37 | /** |
| 38 | * Obtain a qos configured on a device. |
| 39 | * @param qosDesc qos description |
| 40 | * @return a qos description |
| 41 | */ |
| 42 | QosDescription getQos(QosDescription qosDesc); |
| 43 | |
| 44 | /** |
| 45 | * create QoS configuration on a device. |
| 46 | * @param qosDesc qos description |
| 47 | * @return true if succeeds, or false |
| 48 | */ |
| 49 | boolean addQoS(QosDescription qosDesc); |
| 50 | |
| 51 | /** |
| 52 | * Delete a QoS configuration. |
| 53 | * @param qosId qos identifier |
| 54 | */ |
| 55 | void deleteQoS(QosId qosId); |
tanbangcheng | c944c28 | 2017-11-12 20:42:59 +0800 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * bind queue to qos. |
| 59 | * |
| 60 | * @param qosId the qos name |
| 61 | * @param queues qos queues, map of QueueKey - QueueDescription |
| 62 | */ |
| 63 | void insertQueues(QosId qosId, Map<Long, QueueDescription> queues); |
| 64 | |
| 65 | /** |
| 66 | * delete queue from qos. |
| 67 | * |
| 68 | * @param qosId the qos name |
| 69 | * @param queueKeys queue id to delete |
| 70 | */ |
| 71 | void deleteQueues(QosId qosId, List<Long> queueKeys); |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 72 | } |