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