blob: 4b510b122fa3fffd67fca21b251a1cd188b61e40 [file] [log] [blame]
tony-liuaff59a72016-10-21 15:41:46 +08001/*
2 * Copyright 2016-present 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.tetunnel.api;
18
19import org.onosproject.incubator.net.tunnel.Tunnel;
20import org.onosproject.incubator.net.tunnel.TunnelId;
21import org.onosproject.tetunnel.api.tunnel.TeTunnel;
22import org.onosproject.tetunnel.api.tunnel.TeTunnelKey;
23
24/**
25 * Service through which tunnel providers can inject TE Tunnel attributes
26 * into the system.
27 * <p>
28 * Please note that this service works with the existing Tunnel subsystem
29 * together, just as an extension to the tunnel subsystem, and only focus on TE
30 * Tunnel attributes management.
31 */
32public interface TeTunnelProviderService {
33
34 /**
35 * Signals that a TE Tunnel is created with supplied attributes.
36 *
37 * @param teTunnel new created TE Tunnel attributes
38 * @return created tunnel identifier or null if failed
39 */
40 TunnelId teTunnelAdded(TeTunnel teTunnel);
41
42 /**
43 * Signals that a TE Tunnel with specified attributes is removed.
44 *
45 * @param teTunnel removed TE Tunnel
46 */
47 void teTunnelRemoved(TeTunnel teTunnel);
48
49 /**
50 * Updates TE Tunnel attributes with supplied information, the old
51 * attributes will be totally overwrote by the new attributes.
52 *
53 * @param teTunnel new TE Tunnel attributes
54 */
55 void updateTeTunnel(TeTunnel teTunnel);
56
57 /**
58 * Updates state of a TE tunnel specified by the given key.
59 *
60 * @param key TE tunnel key
61 * @param state new state of the tunnel
62 */
63 void updateTunnelState(TeTunnelKey key, Tunnel.State state);
64
65 //TODO: add interfaces for teGlobal and teLspState
66}