blob: ead644fc7e1eacec85b2058128df0edd490f0c61 [file] [log] [blame]
Hyunsun Moonab2cf252015-09-10 17:54:10 -07001/*
2 * Copyright 2014-2015 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 */
16package org.onosproject.cordvtn;
17
Hyunsun Moon6d247342016-02-12 12:48:47 -080018import org.onlab.packet.IpAddress;
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080019import org.onosproject.net.ConnectPoint;
Hyunsun Moon6d247342016-02-12 12:48:47 -080020import org.onosproject.net.HostId;
21
22import java.util.Set;
Hyunsun Moonab2cf252015-09-10 17:54:10 -070023
24/**
25 * Service for provisioning overlay virtual networks on compute nodes.
26 */
27public interface CordVtnService {
Hyunsun Moon2b530322015-09-23 13:24:35 -070028
29 String CORDVTN_APP_ID = "org.onosproject.cordvtn";
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080030
Hyunsun Moonab2cf252015-09-10 17:54:10 -070031 /**
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080032 * Adds a new VM on a given node and connect point.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070033 *
Hyunsun Moon8539b042015-11-07 22:08:43 -080034 * @param node cordvtn node
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080035 * @param connectPoint connect point
Hyunsun Moonab2cf252015-09-10 17:54:10 -070036 */
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080037 void addServiceVm(CordVtnNode node, ConnectPoint connectPoint);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070038
39 /**
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080040 * Removes a VM from a given node and connect point.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070041 *
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080042 * @param connectPoint connect point
Hyunsun Moonab2cf252015-09-10 17:54:10 -070043 */
Hyunsun Moonb77b60f2016-01-15 20:03:18 -080044 void removeServiceVm(ConnectPoint connectPoint);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080045
46 /**
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080047 * Creates dependencies for a given tenant service.
Hyunsun Moon699f46b2015-12-04 11:35:25 -080048 *
Hyunsun Moonc71231d2015-12-16 20:53:23 -080049 * @param tServiceId id of the service which has a dependency
50 * @param pServiceId id of the service which provide dependency
Hyunsun Moon640f183e2016-02-10 17:02:37 -080051 * @param isBidirectional true to enable bidirectional connectivity between two services
Hyunsun Moon699f46b2015-12-04 11:35:25 -080052 */
Hyunsun Moon640f183e2016-02-10 17:02:37 -080053 void createServiceDependency(CordServiceId tServiceId,
54 CordServiceId pServiceId,
55 boolean isBidirectional);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080056
57 /**
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080058 * Removes all dependencies from a given tenant service.
Hyunsun Moon699f46b2015-12-04 11:35:25 -080059 *
Hyunsun Moonc71231d2015-12-16 20:53:23 -080060 * @param tServiceId id of the service which has a dependency
61 * @param pServiceId id of the service which provide dependency
Hyunsun Moon699f46b2015-12-04 11:35:25 -080062 */
Hyunsun Moonc71231d2015-12-16 20:53:23 -080063 void removeServiceDependency(CordServiceId tServiceId, CordServiceId pServiceId);
Hyunsun Moon6d247342016-02-12 12:48:47 -080064
65 /**
66 * Updates virtual service gateways.
67 *
68 * @param vSgHost host id of vSG host
69 * @param serviceVlan service vlan id
70 * @param vSgIps set of ip address of vSGs running in this vSG host
71 */
72 void updateVirtualSubscriberGateways(HostId vSgHost, String serviceVlan,
73 Set<IpAddress> vSgIps);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070074}