Search in sources :

Example 1 with AppBasedRequest

use of com.sequenceiq.environment.api.v1.credential.model.parameters.azure.AppBasedRequest in project cloudbreak by hortonworks.

the class AzureCloudProvider method credential.

@Override
public CredentialTestDto credential(CredentialTestDto credential) {
    AzureCredentialRequestParameters parameters = new AzureCredentialRequestParameters();
    parameters.setSubscriptionId(azureProperties.getCredential().getSubscriptionId());
    parameters.setTenantId(azureProperties.getCredential().getTenantId());
    AppBasedRequest appBased = new AppBasedRequest();
    appBased.setAccessKey(azureProperties.getCredential().getAppId());
    appBased.setSecretKey(azureProperties.getCredential().getAppPassword());
    parameters.setAppBased(appBased);
    validateCredential(parameters);
    return credential.withAzureParameters(parameters).withCloudPlatform(CloudPlatform.AZURE.name()).withDescription(commonCloudProperties().getDefaultCredentialDescription());
}
Also used : AzureCredentialRequestParameters(com.sequenceiq.environment.api.v1.credential.model.parameters.azure.AzureCredentialRequestParameters) AppBasedRequest(com.sequenceiq.environment.api.v1.credential.model.parameters.azure.AppBasedRequest)

Aggregations

AppBasedRequest (com.sequenceiq.environment.api.v1.credential.model.parameters.azure.AppBasedRequest)1 AzureCredentialRequestParameters (com.sequenceiq.environment.api.v1.credential.model.parameters.azure.AzureCredentialRequestParameters)1