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