blob: 783d253e4ba546c8d20eceeb59f41343cb530ac8 [file] [log] [blame]
sangho27462c62015-05-14 00:39:53 -07001/*
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 */
16
17package org.onosproject.segmentrouting;
18
sangho27462c62015-05-14 00:39:53 -070019import java.util.List;
20
21/**
22 * Tunnel interface.
23 */
24public interface Tunnel {
25
26 /**
27 * Returns the tunnel ID.
28 *
29 * @return tunnel ID
30 */
31 String id();
32
33 /**
34 * Returns Segment IDs for the tunnel including source and destination.
35 *
36 * @return List of Node ID
37 */
38 List<Integer> labelIds();
39
40 /**
sangho27462c62015-05-14 00:39:53 -070041 * Returns the group ID for the tunnel.
42 *
43 * @return group ID
44 */
45 int groupId();
46
47 /**
sangho4a5c42a2015-05-20 22:16:38 -070048 * Sets group ID for the tunnel.
sangho27462c62015-05-14 00:39:53 -070049 *
Thomas Vachuskad62989f2015-05-21 16:41:41 -070050 * @param groupId group identifier
sangho27462c62015-05-14 00:39:53 -070051 */
sangho4a5c42a2015-05-20 22:16:38 -070052 void setGroupId(int groupId);
53
54 /**
55 * Sets the flag to allow to remove the group or not.
56 *
57 * @param ok the flag; true - allow to remove
58 */
59 void allowToRemoveGroup(boolean ok);
60
61 /**
62 * Checks if it is allowed to remove the group for the tunnel.
63 *
64 * @return true if allowed, false otherwise
65 */
66 boolean isAllowedToRemoveGroup();
sangho27462c62015-05-14 00:39:53 -070067}