blob: 9f05f1516769126265532d7e1d3256a9e30c2c75 [file] [log] [blame]
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07001/*
yoonseon6b972c32016-12-06 16:45:03 -08002 * Copyright 2016-present Open Networking Laboratory
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
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070049 */
50 TunnelId createTunnel(NetworkId networkId, ConnectPoint src, ConnectPoint dst);
51
52 /**
53 * Destroys the specified network tunnel.
54 *
55 * @param networkId virtual network identifier
56 * @param tunnelId tunnel identifier
57 */
58 void destroyTunnel(NetworkId networkId, TunnelId tunnelId);
59
60}