018a4eac8d32247bc76143e6d947c85fbb656280
[so.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 /*
22  * Copyright (C) 2018 Bell Canada. All rights reserved.
23  *
24  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
25  * the License. You may obtain a copy of the License at
26  *
27  * http://www.apache.org/licenses/LICENSE-2.0
28  *
29  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
30  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
31  * specific language governing permissions and limitations under the License.
32  */
33 package org.onap.so.heatbridge.factory;
34
35 import org.onap.so.heatbridge.HeatBridgeException;
36 import org.onap.so.heatbridge.openstack.api.OpenstackClient;
37
38 /**
39  * Defines contract to load the cloud configuration from SO, authenticate with keystone for a given cloud-region and
40  * tenant.
41  */
42 public interface MsoCloudClientFactory {
43
44     /**
45      * Get the Openstack Client for keystone version specified in cloud configuration.
46      *
47      * @param url openstack url
48      * @param msoId openstack user for mso
49      * @param msoPass openstack password for mso user
50      * @param cloudRegionId cloud-region identifier
51      * @param tenantId tenant identifier
52      * @return Openstack Client for the keystone version requested
53      * @throws HeatBridgeException if any errors when reading cloud configuration or getting openstack client
54      */
55
56
57     OpenstackClient getOpenstackClient(String url, String msoId, String msoPass, String cloudRegionId, String tenantId)
58             throws HeatBridgeException;
59 }