blob: 6bd6bf88b096c93ea87fbc5786b5df15ea76c74c [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
18import org.onosproject.net.Port;
19
20import java.util.Collection;
21import java.util.Map;
22
23/**
24 * Handles port management REST API from Openstack for VMs.
25 */
26public interface OpenstackNetworkingService {
27
28 /**
29 * Returns port information list for the network ID given.
30 *
31 * @param networkId Network ID of the ports
32 * @return port information list
33 */
34 Collection<OpenstackPort> ports(String networkId);
35
36 /**
37 * Returns port information list.
38 *
39 * @return port information list
40 */
41 Collection<OpenstackPort> ports();
42 /**
43 * Returns port information for the port given.
44 *
45 * @param port port reference
46 * @return port information
47 */
48 OpenstackPort port(Port port);
49
50 /**
51 * Returns port information for the port ID given.
52 *
53 * @param portId Port ID
54 * @return port information
55 */
56 OpenstackPort port(String portId);
57
58 /**
59 * Returns network information list for the network ID given.
60 *
61 * @param networkId Network ID
62 * @return network information, or null if not present
63 */
64 OpenstackNetwork network(String networkId);
65
66 /**
67 * Returns the information of all openstack networks.
68 *
69 * @return collection of network information
70 */
71 Collection<OpenstackNetwork> networks();
72
73 /**
74 * Returns subnet information for the subnet ID give.
75 *
76 * @param subnetId Subnet ID
77 * @return subnet information, or null if not present
78 */
79 OpenstackSubnet subnet(String subnetId);
80
81 /**
82 * Returns collection of openstack subnet information.
83 *
84 * @return collection of openststack subnet information
85 */
86 Collection<OpenstackSubnet> subnets();
87
88 /**
89 * Returns the router information list.
90 *
91 * @return router information list
92 */
93 Collection<OpenstackRouter> routers();
94
95 /**
96 * Returns the router information for the router ID given.
97 *
98 * @param routerId router ID
99 * @return router information
100 */
101 OpenstackRouter router(String routerId);
102
103 /**
104 * Retruns OpenstackPortInfo map.
105 *
106 * @return OpenstackPortInfo map
107 */
108 Map<String, OpenstackPortInfo> openstackPortInfo();
109
110 /**
111 * Sets configurations specified by net-config.xml file.
112 *
113 * @param neutronUrl neutron server url
114 * @param keystoneUrl keystone server url
115 * @param userName horizon user name
116 * @param pass horizon passowrd
117 */
118 void setConfigurations(String neutronUrl, String keystoneUrl, String userName, String pass);
119
120 /**
121 * Returns Security Group information of the security groupd id given.
122 *
123 * @param id security group id
124 * @return security group information
125 */
126 OpenstackSecurityGroup getSecurityGroup(String id);
127
128}