blob: c56ae70f0640cf8a001bd7000518646d3eba1d38 [file] [log] [blame]
sangho1e575652015-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
sangho1e575652015-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 /**
sangho1e575652015-05-14 00:39:53 -070041 * Returns the group ID for the tunnel.
42 *
43 * @return group ID
44 */
45 int groupId();
46
47 /**
sangho0b2b6d12015-05-20 22:16:38 -070048 * Sets group ID for the tunnel.
sangho1e575652015-05-14 00:39:53 -070049 *
sangho1e575652015-05-14 00:39:53 -070050 */
sangho0b2b6d12015-05-20 22:16:38 -070051 void setGroupId(int groupId);
52
53 /**
54 * Sets the flag to allow to remove the group or not.
55 *
56 * @param ok the flag; true - allow to remove
57 */
58 void allowToRemoveGroup(boolean ok);
59
60 /**
61 * Checks if it is allowed to remove the group for the tunnel.
62 *
63 * @return true if allowed, false otherwise
64 */
65 boolean isAllowedToRemoveGroup();
sangho1e575652015-05-14 00:39:53 -070066}