blob: 21c85153b1a9fff464cf15c0ac06a1cf887cbf2c [file] [log] [blame]
sangho0c2a3da2016-02-16 13:39:07 +09001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
sangho0c2a3da2016-02-16 13:39:07 +09003 *
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 */
sangho93447f12016-02-24 00:33:22 +090016package org.onosproject.openstackinterface;
sangho0c2a3da2016-02-16 13:39:07 +090017
18import org.onosproject.net.Port;
19
20import java.util.Collection;
sangho0c2a3da2016-02-16 13:39:07 +090021
22/**
23 * Handles port management REST API from Openstack for VMs.
24 */
sangho93447f12016-02-24 00:33:22 +090025public interface OpenstackInterfaceService {
sangho0c2a3da2016-02-16 13:39:07 +090026
27 /**
28 * Returns port information list for the network ID given.
29 *
30 * @param networkId Network ID of the ports
31 * @return port information list
32 */
33 Collection<OpenstackPort> ports(String networkId);
34
35 /**
36 * Returns port information list.
37 *
38 * @return port information list
39 */
40 Collection<OpenstackPort> ports();
41 /**
42 * Returns port information for the port given.
43 *
44 * @param port port reference
45 * @return port information
46 */
47 OpenstackPort port(Port port);
48
49 /**
50 * Returns port information for the port ID given.
51 *
52 * @param portId Port ID
53 * @return port information
54 */
55 OpenstackPort port(String portId);
56
57 /**
58 * Returns network information list for the network ID given.
59 *
60 * @param networkId Network ID
61 * @return network information, or null if not present
62 */
63 OpenstackNetwork network(String networkId);
64
65 /**
66 * Returns the information of all openstack networks.
67 *
68 * @return collection of network information
69 */
70 Collection<OpenstackNetwork> networks();
71
72 /**
73 * Returns subnet information for the subnet ID give.
74 *
75 * @param subnetId Subnet ID
76 * @return subnet information, or null if not present
77 */
78 OpenstackSubnet subnet(String subnetId);
79
80 /**
81 * Returns collection of openstack subnet information.
82 *
83 * @return collection of openststack subnet information
84 */
85 Collection<OpenstackSubnet> subnets();
86
87 /**
88 * Returns the router information list.
89 *
90 * @return router information list
91 */
92 Collection<OpenstackRouter> routers();
93
94 /**
95 * Returns the router information for the router ID given.
96 *
97 * @param routerId router ID
98 * @return router information
99 */
100 OpenstackRouter router(String routerId);
101
102 /**
sangho0c2a3da2016-02-16 13:39:07 +0900103 * Returns Security Group information of the security groupd id given.
104 *
105 * @param id security group id
106 * @return security group information
107 */
108 OpenstackSecurityGroup getSecurityGroup(String id);
109
110}