blob: 1ec05363a212fb0a0bc7770abd615c0aef60f4b3 [file] [log] [blame]
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07001/*
2 * Copyright 2015-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 */
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070016package org.onosproject.incubator.net.virtual;
17
18import org.onosproject.incubator.net.tunnel.TunnelId;
19import org.onosproject.net.ConnectPoint;
20import org.onosproject.net.provider.Provider;
21
22/**
23 * Entity capable of providing traffic isolation constructs for use in
24 * implementation of virtual devices and virtual links.
25 */
26public interface VirtualNetworkProvider extends Provider {
27
28 /**
29 * Creates a network tunnel for all traffic from the specified source
30 * connection point to the indicated destination connection point.
31 *
32 * @param networkId virtual network identifier
33 * @param src source connection point
34 * @param dst destination connection point
Brian O'Connor52515622015-10-09 17:03:44 -070035 * @return new tunnel's id
Thomas Vachuska3d62fd72015-09-25 14:58:13 -070036 */
37 TunnelId createTunnel(NetworkId networkId, ConnectPoint src, ConnectPoint dst);
38
39 /**
40 * Destroys the specified network tunnel.
41 *
42 * @param networkId virtual network identifier
43 * @param tunnelId tunnel identifier
44 */
45 void destroyTunnel(NetworkId networkId, TunnelId tunnelId);
46
47}