blob: 0c35fba48dd8ade758665410ded5d7df5617bbef [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
19import org.onosproject.net.DeviceId;
20
21import java.util.List;
22
23/**
24 * Tunnel interface.
25 */
26public interface Tunnel {
27
28 /**
29 * Returns the tunnel ID.
30 *
31 * @return tunnel ID
32 */
33 String id();
34
35 /**
36 * Returns Segment IDs for the tunnel including source and destination.
37 *
38 * @return List of Node ID
39 */
40 List<Integer> labelIds();
41
42 /**
43 * Creates a tunnel.
44 *
45 * @return true if succeeds, false otherwise
46 */
47 boolean create();
48
49 /**
50 * Removes the tunnel.
51 *
52 * @return true if succeeds, false otherwise.
53 */
54 boolean remove();
55
56 /**
57 * Returns the group ID for the tunnel.
58 *
59 * @return group ID
60 */
61 int groupId();
62
63 /**
64 * Returns the source device Id of the tunnel.
65 *
66 * @return source device Id
67 */
68 DeviceId source();
69}