Search in sources :

Example 1 with MsoCloudClientFactoryImpl

use of org.onap.so.heatbridge.factory.MsoCloudClientFactoryImpl in project so by onap.

the class HeatBridgeImpl method authenticate.

@Override
public OpenstackClient authenticate() throws HeatBridgeException {
    String keystoneVersion = "";
    if (ServerType.KEYSTONE.equals(cloudIdentity.getIdentityServerType()))
        keystoneVersion = "v2.0";
    else if (ServerType.KEYSTONE_V3.equals(cloudIdentity.getIdentityServerType())) {
        keystoneVersion = "v3";
    } else {
        keystoneVersion = "UNKNOWN";
    }
    logger.trace("Keystone Version: {} ", keystoneVersion);
    this.osClient = new MsoCloudClientFactoryImpl(new OpenstackClientFactoryImpl()).getOpenstackClient(cloudIdentity.getIdentityUrl(), cloudIdentity.getMsoId(), cloudIdentity.getMsoPass(), regionId, tenantId, keystoneVersion, cloudIdentity.getUserDomainName(), cloudIdentity.getProjectDomainName());
    logger.trace("Successfully authenticated with keystone for tenant: {} and region: {}", tenantId, regionId);
    return osClient;
}
Also used : MsoCloudClientFactoryImpl(org.onap.so.heatbridge.factory.MsoCloudClientFactoryImpl) IPAddressString(inet.ipaddr.IPAddressString) OpenstackClientFactoryImpl(org.onap.so.heatbridge.openstack.factory.OpenstackClientFactoryImpl)

Aggregations

IPAddressString (inet.ipaddr.IPAddressString)1 MsoCloudClientFactoryImpl (org.onap.so.heatbridge.factory.MsoCloudClientFactoryImpl)1 OpenstackClientFactoryImpl (org.onap.so.heatbridge.openstack.factory.OpenstackClientFactoryImpl)1