blob: a826f986420bc6abaa9fa4de9a4720e0c21cd8e6 [file] [log] [blame]
sangho0c2a3da2016-02-16 13:39:07 +09001/*
2 * Copyright 2015-2016 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.openstacknetworking;
17
sangho93447f12016-02-24 00:33:22 +090018import org.onosproject.openstackinterface.OpenstackNetwork;
19import org.onosproject.openstackinterface.OpenstackPort;
20import org.onosproject.openstackinterface.OpenstackSubnet;
21
sangho0c2a3da2016-02-16 13:39:07 +090022import java.util.Map;
23
24/**
25 * Handles port management REST API from Openstack for VMs.
26 */
27public 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}