blob: 16898d7b287cde6a0e6233f092f127ca4f34344c [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
sanghoshin46297d22015-11-03 17:51:24 +090018import java.util.Collection;
19
sanghoshin94872a12015-10-16 18:04:34 +090020/**
sanghoshin46297d22015-11-03 17:51:24 +090021 * Handles port management REST API from Openstack for VMs.
sanghoshin94872a12015-10-16 18:04:34 +090022 */
23public 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 /**
sanghoshin46297d22015-11-03 17:51:24 +090045 * Stores the network information created by openstack.
sanghoshin94872a12015-10-16 18:04:34 +090046 *
47 * @param openstackNetwork network information
48 */
49 void createNetwork(OpenstackNetwork openstackNetwork);
50
danielbb83ebc2015-10-29 15:13:06 +090051 /**
sanghoshin46297d22015-11-03 17:51:24 +090052 * Stores the subnet information created by openstack.
danielbb83ebc2015-10-29 15:13:06 +090053 *
54 * @param openstackSubnet subnet information
55 */
56 void createSubnet(OpenstackSubnet openstackSubnet);
sanghoshin46297d22015-11-03 17:51:24 +090057
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
sanghoshin94872a12015-10-16 18:04:34 +090082}