blob: 3c2e1ec2d7848b78f54e5703a6a90a6b364f3d0f [file] [log] [blame]
Srikanth Vavilapalli56db94f2015-01-22 22:30:17 -08001/*
2 * Copyright 2015 Open Networking Laboratory
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.net.group;
17
18import org.onosproject.net.PortNumber;
19import org.onosproject.net.flow.TrafficTreatment;
20import org.onosproject.core.GroupId;
21
22/* Group Bucket definition. A default group Bucket is collection of
23 * Instructions that can be performed on a traffic flow. A failover
24 * group bucket is associated with a specific port or group that
25 * controls its liveness. A select group bucket contains optional
26 * weight field to define the weights among the buckets in the group.
27 */
28public interface GroupBucket {
29 /**
30 * Return group type of the bucket.
31 *
32 * @return GroupType group type
33 */
34 public GroupDescription.Type type();
35
36 /**
37 * Return list of Traffic instructions that are part of the bucket.
38 *
39 * @return TrafficTreatment traffic instruction list
40 */
41 public TrafficTreatment treatment();
42
43 /**
44 * Return weight of select group bucket.
45 *
46 * @return short weight associated with a bucket
47 */
48 public short weight();
49
50 /**
51 * Return port number used for liveness detection for a
52 * failover bucket.
53 *
54 * @return PortNumber port number used for liveness detection
55 */
56 public PortNumber watchPort();
57
58 /**
59 * Return group identifier used for liveness detection for a
60 * failover bucket.
61 *
62 * @return GroupId group identifier to be used for liveness detection
63 */
64 public GroupId watchGroup();
65
66}