blob: 59b8db0c67cdfe8f4b0a6a6ee3911e023a103cd1 [file] [log] [blame]
sanghoshin94872a12015-10-16 18:04:34 +09001/*
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 */
16package org.onosproject.openstackswitching;
17
sanghoshinf25d2e02015-11-11 23:07:17 +090018import org.onosproject.net.Port;
19
sanghoshin46297d22015-11-03 17:51:24 +090020import java.util.Collection;
21
sanghoshin94872a12015-10-16 18:04:34 +090022/**
sanghoshin46297d22015-11-03 17:51:24 +090023 * Handles port management REST API from Openstack for VMs.
sanghoshin94872a12015-10-16 18:04:34 +090024 */
25public 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 /**
sanghoshin46297d22015-11-03 17:51:24 +090047 * Stores the network information created by openstack.
sanghoshin94872a12015-10-16 18:04:34 +090048 *
49 * @param openstackNetwork network information
50 */
51 void createNetwork(OpenstackNetwork openstackNetwork);
52
danielbb83ebc2015-10-29 15:13:06 +090053 /**
sanghoshin46297d22015-11-03 17:51:24 +090054 * Stores the subnet information created by openstack.
danielbb83ebc2015-10-29 15:13:06 +090055 *
56 * @param openstackSubnet subnet information
57 */
58 void createSubnet(OpenstackSubnet openstackSubnet);
sanghoshin46297d22015-11-03 17:51:24 +090059
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 /**
sanghoshinf25d2e02015-11-11 23:07:17 +090069 * 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 /**
sanghoshin46297d22015-11-03 17:51:24 +090077 * 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
sanghoshin94872a12015-10-16 18:04:34 +090092}