Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-openstack-adapters / src / main / java / org / onap / so / heatbridge / openstack / api / OpenstackClient.java
1 /*-
2  * Copyright (C) 2018 Bell Canada. All rights reserved.
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  */
16
17 package org.onap.so.heatbridge.openstack.api;
18
19 import java.util.List;
20 import java.util.Map;
21 import org.openstack4j.model.compute.Server;
22 import org.openstack4j.model.heat.Resource;
23 import org.openstack4j.model.network.Network;
24 import org.openstack4j.model.network.Port;
25
26 public interface OpenstackClient {
27
28     /**
29      * Get a server object by server ID
30      * 
31      * @param serverId Unique server-name (simple name) or server-id (UUID)
32      * @return Server object
33      */
34     Server getServerById(String serverId);
35
36     /**
37      * Get a port object by port ID
38      * 
39      * @param portId Unique UUID of the port.
40      * @return Port object.
41      */
42     Port getPortById(String portId);
43
44     /**
45      * Returns a list of all ports we have the right to see
46      * 
47      * @return List of all Openstack ports
48      */
49     List<Port> getAllPorts();
50
51     /**
52      * Returns a list of all the resources for the stack
53      * 
54      * @param stackId Stack name or unique UUID
55      * @param nestingDepth The recursion level for which resources will be listed.
56      * @return List of Openstack Stack resources
57      */
58     List<Resource> getStackBasedResources(String stackId, int nestingDepth);
59
60     /**
61      * Get a network instance by network ID
62      * 
63      * @param networkId Unique UUID of the network.
64      * @return Network object.
65      */
66     Network getNetworkById(String networkId);
67
68     /**
69      * List networks by filtering parameters
70      * 
71      * @param filterParams key-value pairs for filtering params
72      * @return List of filtered Network objects
73      */
74     List<Network> listNetworksByFilter(Map<String, String> filterParams);
75 }