blob: 3f176ed9bb60f9ce52d44916d17d6fb0968faeb4 [file] [log] [blame]
Frank Wange11a98d2016-10-26 17:04:03 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Frank Wange11a98d2016-10-26 17:04:03 +08003 *
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.net.behaviour;
17import com.google.common.annotations.Beta;
18import org.onosproject.net.driver.HandlerBehaviour;
19
20import java.util.Collection;
tanbangchengc944c282017-11-12 20:42:59 +080021import java.util.List;
22import java.util.Map;
Frank Wange11a98d2016-10-26 17:04:03 +080023
24/**
25 * Behaviour for handling various operations for qos configurations.
26 */
27@Beta
28public 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);
tanbangchengc944c282017-11-12 20:42:59 +080056
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 Wange11a98d2016-10-26 17:04:03 +080072}