sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 43b5354 | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [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 | |
| 17 | package org.onosproject.segmentrouting; |
| 18 | |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 19 | import java.util.List; |
| 20 | |
| 21 | /** |
| 22 | * Tunnel interface. |
| 23 | */ |
| 24 | public 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 | /** |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 41 | * Returns the group ID for the tunnel. |
| 42 | * |
| 43 | * @return group ID |
| 44 | */ |
| 45 | int groupId(); |
| 46 | |
| 47 | /** |
sangho | 4a5c42a | 2015-05-20 22:16:38 -0700 | [diff] [blame] | 48 | * Sets group ID for the tunnel. |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 49 | * |
Thomas Vachuska | d62989f | 2015-05-21 16:41:41 -0700 | [diff] [blame] | 50 | * @param groupId group identifier |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 51 | */ |
sangho | 4a5c42a | 2015-05-20 22:16:38 -0700 | [diff] [blame] | 52 | 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(); |
sangho | 27462c6 | 2015-05-14 00:39:53 -0700 | [diff] [blame] | 67 | } |