sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [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.openstacknetworking; |
| 17 | |
sangho | 93447f1 | 2016-02-24 00:33:22 +0900 | [diff] [blame] | 18 | import org.onosproject.openstackinterface.OpenstackNetwork; |
| 19 | import org.onosproject.openstackinterface.OpenstackPort; |
| 20 | import org.onosproject.openstackinterface.OpenstackSubnet; |
| 21 | |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 22 | import java.util.Map; |
| 23 | |
| 24 | /** |
| 25 | * Handles port management REST API from Openstack for VMs. |
| 26 | */ |
| 27 | public interface OpenstackSwitchingService { |
| 28 | |
| 29 | /** |
| 30 | * Store the port information created by Openstack. |
| 31 | * |
| 32 | * @param openstackPort port information |
| 33 | */ |
| 34 | void createPorts(OpenstackPort openstackPort); |
| 35 | |
| 36 | /** |
| 37 | * Removes flow rules corresponding to the port removed by Openstack. |
| 38 | * |
| 39 | * @param uuid UUID |
| 40 | */ |
| 41 | void removePort(String uuid); |
| 42 | |
| 43 | /** |
| 44 | * Updates flow rules corresponding to the port information updated by Openstack. |
| 45 | * |
| 46 | * @param openstackPort OpenStack port |
| 47 | */ |
| 48 | void updatePort(OpenstackPort openstackPort); |
| 49 | |
| 50 | /** |
| 51 | * Stores the network information created by openstack. |
| 52 | * |
| 53 | * @param openstackNetwork network information |
| 54 | */ |
| 55 | void createNetwork(OpenstackNetwork openstackNetwork); |
| 56 | |
| 57 | /** |
| 58 | * Stores the subnet information created by openstack. |
| 59 | * |
| 60 | * @param openstackSubnet subnet information |
| 61 | */ |
| 62 | void createSubnet(OpenstackSubnet openstackSubnet); |
| 63 | |
| 64 | /** |
| 65 | * Retruns OpenstackPortInfo map. |
| 66 | * |
| 67 | * @return OpenstackPortInfo map |
| 68 | */ |
| 69 | Map<String, OpenstackPortInfo> openstackPortInfo(); |
| 70 | |
| 71 | } |