blob: 5950670ec8aae2b1f15fadb7f46958dc798890e3 [file] [log] [blame]
Hyunsun Moonab2cf252015-09-10 17:54:10 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Hyunsun Moonab2cf252015-09-10 17:54:10 -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 */
Hyunsun Moon7f4ed9d2016-04-14 16:13:42 -070016package org.onosproject.cordvtn.api;
Hyunsun Moonab2cf252015-09-10 17:54:10 -070017
Hyunsun Moon6d247342016-02-12 12:48:47 -080018import org.onlab.packet.IpAddress;
Hyunsun Moonae39ae82016-02-17 15:02:06 -080019import org.onlab.packet.MacAddress;
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080020import org.onosproject.net.ConnectPoint;
Hyunsun Moon6d247342016-02-12 12:48:47 -080021import org.onosproject.net.HostId;
22
Hyunsun Moonae39ae82016-02-17 15:02:06 -080023import java.util.Map;
Hyunsun Moonab2cf252015-09-10 17:54:10 -070024
25/**
26 * Service for provisioning overlay virtual networks on compute nodes.
27 */
28public interface CordVtnService {
Hyunsun Moon2b530322015-09-23 13:24:35 -070029
30 String CORDVTN_APP_ID = "org.onosproject.cordvtn";
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080031
Hyunsun Moonab2cf252015-09-10 17:54:10 -070032 /**
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080033 * Adds a new VM on a given node and connect point.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070034 *
Hyunsun Moon8539b042015-11-07 22:08:43 -080035 * @param node cordvtn node
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080036 * @param connectPoint connect point
Hyunsun Moonab2cf252015-09-10 17:54:10 -070037 */
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080038 void addServiceVm(CordVtnNode node, ConnectPoint connectPoint);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070039
40 /**
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080041 * Removes a VM from a given node and connect point.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070042 *
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080043 * @param connectPoint connect point
Hyunsun Moonab2cf252015-09-10 17:54:10 -070044 */
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080045 void removeServiceVm(ConnectPoint connectPoint);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080046
47 /**
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080048 * Creates dependencies for a given tenant service.
Hyunsun Moon699f46b2015-12-04 11:35:25 -080049 *
Hyunsun Moonc71231d2015-12-16 20:53:23 -080050 * @param tServiceId id of the service which has a dependency
51 * @param pServiceId id of the service which provide dependency
Hyunsun Moon640f183e2016-02-10 17:02:37 -080052 * @param isBidirectional true to enable bidirectional connectivity between two services
Hyunsun Moon699f46b2015-12-04 11:35:25 -080053 */
Hyunsun Moon640f183e2016-02-10 17:02:37 -080054 void createServiceDependency(CordServiceId tServiceId,
55 CordServiceId pServiceId,
56 boolean isBidirectional);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080057
58 /**
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080059 * Removes all dependencies from a given tenant service.
Hyunsun Moon699f46b2015-12-04 11:35:25 -080060 *
Hyunsun Moonc71231d2015-12-16 20:53:23 -080061 * @param tServiceId id of the service which has a dependency
62 * @param pServiceId id of the service which provide dependency
Hyunsun Moon699f46b2015-12-04 11:35:25 -080063 */
Hyunsun Moonc71231d2015-12-16 20:53:23 -080064 void removeServiceDependency(CordServiceId tServiceId, CordServiceId pServiceId);
Hyunsun Moon6d247342016-02-12 12:48:47 -080065
66 /**
67 * Updates virtual service gateways.
68 *
69 * @param vSgHost host id of vSG host
70 * @param serviceVlan service vlan id
Hyunsun Moonae39ae82016-02-17 15:02:06 -080071 * @param vSgs map of ip and mac address of vSGs running in this vSG host
Hyunsun Moon6d247342016-02-12 12:48:47 -080072 */
73 void updateVirtualSubscriberGateways(HostId vSgHost, String serviceVlan,
Hyunsun Moonae39ae82016-02-17 15:02:06 -080074 Map<IpAddress, MacAddress> vSgs);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070075}