sanghoshin | 94872a1 | 2015-10-16 18:04:34 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 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 | */ |
| 16 | package org.onosproject.openstackswitching; |
| 17 | |
sanghoshin | 46297d2 | 2015-11-03 17:51:24 +0900 | [diff] [blame^] | 18 | import java.util.Collection; |
| 19 | |
sanghoshin | 94872a1 | 2015-10-16 18:04:34 +0900 | [diff] [blame] | 20 | /** |
sanghoshin | 46297d2 | 2015-11-03 17:51:24 +0900 | [diff] [blame^] | 21 | * Handles port management REST API from Openstack for VMs. |
sanghoshin | 94872a1 | 2015-10-16 18:04:34 +0900 | [diff] [blame] | 22 | */ |
| 23 | public interface OpenstackSwitchingService { |
| 24 | |
| 25 | /** |
| 26 | * Store the port information created by Openstack. |
| 27 | * |
| 28 | * @param openstackPort port information |
| 29 | */ |
| 30 | void createPorts(OpenstackPort openstackPort); |
| 31 | |
| 32 | /** |
| 33 | * Removes flow rules corresponding to the port removed by Openstack. |
| 34 | * |
| 35 | */ |
| 36 | void deletePorts(); |
| 37 | |
| 38 | /** |
| 39 | * Updates flow rules corresponding to the port information updated by Openstack. |
| 40 | * |
| 41 | */ |
| 42 | void updatePorts(); |
| 43 | |
| 44 | /** |
sanghoshin | 46297d2 | 2015-11-03 17:51:24 +0900 | [diff] [blame^] | 45 | * Stores the network information created by openstack. |
sanghoshin | 94872a1 | 2015-10-16 18:04:34 +0900 | [diff] [blame] | 46 | * |
| 47 | * @param openstackNetwork network information |
| 48 | */ |
| 49 | void createNetwork(OpenstackNetwork openstackNetwork); |
| 50 | |
daniel | bb83ebc | 2015-10-29 15:13:06 +0900 | [diff] [blame] | 51 | /** |
sanghoshin | 46297d2 | 2015-11-03 17:51:24 +0900 | [diff] [blame^] | 52 | * Stores the subnet information created by openstack. |
daniel | bb83ebc | 2015-10-29 15:13:06 +0900 | [diff] [blame] | 53 | * |
| 54 | * @param openstackSubnet subnet information |
| 55 | */ |
| 56 | void createSubnet(OpenstackSubnet openstackSubnet); |
sanghoshin | 46297d2 | 2015-11-03 17:51:24 +0900 | [diff] [blame^] | 57 | |
| 58 | /** |
| 59 | * Returns port information list for the network ID given. |
| 60 | * |
| 61 | * @param networkId Network ID of the ports |
| 62 | * @return port information list |
| 63 | */ |
| 64 | Collection<OpenstackPort> ports(String networkId); |
| 65 | |
| 66 | /** |
| 67 | * Returns port information for the port ID given. |
| 68 | * |
| 69 | * @param portId Port ID |
| 70 | * @return port information |
| 71 | */ |
| 72 | OpenstackPort port(String portId); |
| 73 | |
| 74 | /** |
| 75 | * Returns network information list for the network ID given. |
| 76 | * |
| 77 | * @param networkId Network ID |
| 78 | * @return network information list |
| 79 | */ |
| 80 | OpenstackNetwork network(String networkId); |
| 81 | |
sanghoshin | 94872a1 | 2015-10-16 18:04:34 +0900 | [diff] [blame] | 82 | } |