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;
}
Aggregations