blob: 9841f1231a8b958231260550a7467bcf7348a46e [file] [log] [blame]
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07003 *
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 */
yoonseon6b972c32016-12-06 16:45:03 -080016package org.onosproject.incubator.net.virtual.provider;
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070017
18import org.onosproject.incubator.net.tunnel.TunnelId;
yoonseon6b972c32016-12-06 16:45:03 -080019import org.onosproject.incubator.net.virtual.NetworkId;
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070020import org.onosproject.net.ConnectPoint;
21import org.onosproject.net.provider.Provider;
22
23/**
24 * Entity capable of providing traffic isolation constructs for use in
25 * implementation of virtual devices and virtual links.
26 */
27public interface VirtualNetworkProvider extends Provider {
28
29 /**
Brian Stankefb61df42016-07-25 11:47:51 -040030 * Indicates whether or not the specified connect points on the underlying
31 * network are traversable/reachable.
32 *
33 * @param src source connection point
34 * @param dst destination connection point
35 * @return true if the destination is reachable from the source
36 */
37 boolean isTraversable(ConnectPoint src, ConnectPoint dst);
38
39 // TODO: Further enhance this interface to support the virtual intent programming across this boundary.
40
41 /**
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070042 * Creates a network tunnel for all traffic from the specified source
43 * connection point to the indicated destination connection point.
44 *
45 * @param networkId virtual network identifier
46 * @param src source connection point
47 * @param dst destination connection point
Brian O'Connor52515622015-10-09 17:03:44 -070048 * @return new tunnel's id
Yoonseon Hanf9f1dbe2017-06-16 14:10:07 +090049 * @deprecated in Loon Release (1.11)
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070050 */
Yoonseon Hanf9f1dbe2017-06-16 14:10:07 +090051 @Deprecated
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070052 TunnelId createTunnel(NetworkId networkId, ConnectPoint src, ConnectPoint dst);
53
54 /**
55 * Destroys the specified network tunnel.
56 *
57 * @param networkId virtual network identifier
58 * @param tunnelId tunnel identifier
Yoonseon Hanf9f1dbe2017-06-16 14:10:07 +090059 * @deprecated in Loon Release (1.11)
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070060 */
Yoonseon Hanf9f1dbe2017-06-16 14:10:07 +090061 @Deprecated
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070062 void destroyTunnel(NetworkId networkId, TunnelId tunnelId);
63
64}