Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.cordvtn; |
| 17 | |
Hyunsun Moon | 6d24734 | 2016-02-12 12:48:47 -0800 | [diff] [blame] | 18 | import org.onlab.packet.IpAddress; |
Hyunsun Moon | ae39ae8 | 2016-02-17 15:02:06 -0800 | [diff] [blame] | 19 | import org.onlab.packet.MacAddress; |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 20 | import org.onosproject.net.ConnectPoint; |
Hyunsun Moon | 6d24734 | 2016-02-12 12:48:47 -0800 | [diff] [blame] | 21 | import org.onosproject.net.HostId; |
| 22 | |
Hyunsun Moon | ae39ae8 | 2016-02-17 15:02:06 -0800 | [diff] [blame] | 23 | import java.util.Map; |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Service for provisioning overlay virtual networks on compute nodes. |
| 27 | */ |
| 28 | public interface CordVtnService { |
Hyunsun Moon | 2b53032 | 2015-09-23 13:24:35 -0700 | [diff] [blame] | 29 | |
| 30 | String CORDVTN_APP_ID = "org.onosproject.cordvtn"; |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 31 | |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 32 | /** |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 33 | * Adds a new VM on a given node and connect point. |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 34 | * |
Hyunsun Moon | 8539b04 | 2015-11-07 22:08:43 -0800 | [diff] [blame] | 35 | * @param node cordvtn node |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 36 | * @param connectPoint connect point |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 37 | */ |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 38 | void addServiceVm(CordVtnNode node, ConnectPoint connectPoint); |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 41 | * Removes a VM from a given node and connect point. |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 42 | * |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 43 | * @param connectPoint connect point |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 44 | */ |
Hyunsun Moon | b77b60f | 2016-01-15 20:03:18 -0800 | [diff] [blame] | 45 | void removeServiceVm(ConnectPoint connectPoint); |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 46 | |
| 47 | /** |
Hyunsun Moon | bfc47d1 | 2015-12-07 14:06:28 -0800 | [diff] [blame] | 48 | * Creates dependencies for a given tenant service. |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 49 | * |
Hyunsun Moon | c71231d | 2015-12-16 20:53:23 -0800 | [diff] [blame] | 50 | * @param tServiceId id of the service which has a dependency |
| 51 | * @param pServiceId id of the service which provide dependency |
Hyunsun Moon | 640f183e | 2016-02-10 17:02:37 -0800 | [diff] [blame] | 52 | * @param isBidirectional true to enable bidirectional connectivity between two services |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 53 | */ |
Hyunsun Moon | 640f183e | 2016-02-10 17:02:37 -0800 | [diff] [blame] | 54 | void createServiceDependency(CordServiceId tServiceId, |
| 55 | CordServiceId pServiceId, |
| 56 | boolean isBidirectional); |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 57 | |
| 58 | /** |
Hyunsun Moon | bfc47d1 | 2015-12-07 14:06:28 -0800 | [diff] [blame] | 59 | * Removes all dependencies from a given tenant service. |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 60 | * |
Hyunsun Moon | c71231d | 2015-12-16 20:53:23 -0800 | [diff] [blame] | 61 | * @param tServiceId id of the service which has a dependency |
| 62 | * @param pServiceId id of the service which provide dependency |
Hyunsun Moon | 699f46b | 2015-12-04 11:35:25 -0800 | [diff] [blame] | 63 | */ |
Hyunsun Moon | c71231d | 2015-12-16 20:53:23 -0800 | [diff] [blame] | 64 | void removeServiceDependency(CordServiceId tServiceId, CordServiceId pServiceId); |
Hyunsun Moon | 6d24734 | 2016-02-12 12:48:47 -0800 | [diff] [blame] | 65 | |
| 66 | /** |
| 67 | * Updates virtual service gateways. |
| 68 | * |
| 69 | * @param vSgHost host id of vSG host |
| 70 | * @param serviceVlan service vlan id |
Hyunsun Moon | ae39ae8 | 2016-02-17 15:02:06 -0800 | [diff] [blame] | 71 | * @param vSgs map of ip and mac address of vSGs running in this vSG host |
Hyunsun Moon | 6d24734 | 2016-02-12 12:48:47 -0800 | [diff] [blame] | 72 | */ |
| 73 | void updateVirtualSubscriberGateways(HostId vSgHost, String serviceVlan, |
Hyunsun Moon | ae39ae8 | 2016-02-17 15:02:06 -0800 | [diff] [blame] | 74 | Map<IpAddress, MacAddress> vSgs); |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 75 | } |