blob: b6106214b3ff9900df25b9b7595aa9fb60962a29 [file] [log] [blame]
tony-liuaff59a72016-10-21 15:41:46 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
tony-liuaff59a72016-10-21 15:41:46 +08003 *
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.tetunnel.api;
18
19import org.onosproject.incubator.net.tunnel.TunnelId;
20import org.onosproject.tetopology.management.api.TeTopologyKey;
chenqinghui86320ae2016-12-01 15:40:39 +080021import org.onosproject.tetunnel.api.lsp.TeLsp;
22import org.onosproject.tetunnel.api.lsp.TeLspKey;
tony-liuaff59a72016-10-21 15:41:46 +080023import org.onosproject.tetunnel.api.tunnel.TeTunnel;
24import org.onosproject.tetunnel.api.tunnel.TeTunnelKey;
25
26import java.util.Collection;
27
28/**
29 * Service for TE Tunnel attributes management.
30 * <p>
31 * Please note that this service works with the existing Tunnel subsystem
32 * together, just as an extension to the tunnel subsystem, and only focus on TE
33 * Tunnel attributes management.
34 */
35public interface TeTunnelService {
36
37 /**
38 * Returns the TE Tunnel with the specified key.
39 *
40 * @param teTunnelKey TE Tunnel key
41 * @return TeTunnel or null if one with the given key is not known
42 */
43 TeTunnel getTeTunnel(TeTunnelKey teTunnelKey);
44
45 /**
46 * Returns the TE Tunnel with the specified identifier.
47 *
48 * @param tunnelId corresponding tunnel identifier
49 * @return TeTunnel or null if one with the given identifier is not known
50 */
51 TeTunnel getTeTunnel(TunnelId tunnelId);
52
53 /**
54 * Returns the corresponding tunnel identifier of a TE tunnel with the
55 * specified key.
56 *
57 * @param teTunnelKey TE Tunnel key
58 * @return corresponding tunnel identifier or null if one with the given
59 * key is not known
60 */
61 TunnelId getTunnelId(TeTunnelKey teTunnelKey);
62
63 /**
64 * Returns a collection of currently known TE tunnels.
65 *
66 * @return collection of TE tunnels
67 */
68 Collection<TeTunnel> getTeTunnels();
69
70 /**
71 * Returns a collection of currently known TE Tunnels filtered by the
72 * specified TE tunnel type.
73 *
74 * @param type TE tunnel type to filter by
75 * @return filtered collection of TE tunnels
76 */
77 Collection<TeTunnel> getTeTunnels(TeTunnel.Type type);
78
79 /**
80 * Returns a collection of currently known TE tunnels filtered by specified
81 * TE topology key.
82 *
83 * @param teTopologyKey TE topology key to filter by
84 * @return filtered collection of TE tunnels
85 */
86 Collection<TeTunnel> getTeTunnels(TeTopologyKey teTopologyKey);
87
chenqinghui86320ae2016-12-01 15:40:39 +080088 /**
89 * Returns the TE LSP with the specified key.
90 *
91 * @param key TE LSP key
92 * @return TeLsp or null if one with the given key is not known
93 */
94 TeLsp getTeLsp(TeLspKey key);
95
96 /**
97 * Returns a collection of currently known TE LSPs.
98 *
99 * @return collection of TeLsp
100 */
101 Collection<TeLsp> getTeLsps();
102
tony-liuaff59a72016-10-21 15:41:46 +0800103 //TODO: add interfaces for teGlobal and teLspState
104}