Search in sources :

Example 51 with AuthenticatedContext

use of com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext in project cloudbreak by hortonworks.

the class CloudFormationTemplateBuilderTest method authenticatedContext.

private AuthenticatedContext authenticatedContext() {
    Location location = Location.location(Region.region("region"), AvailabilityZone.availabilityZone("az"));
    CloudContext cloudContext = new CloudContext(5L, "name", "platform", "owner", "variant", location);
    CloudCredential cc = new CloudCredential(1L, null);
    return new AuthenticatedContext(cloudContext, cc);
}
Also used : CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) Location(com.sequenceiq.cloudbreak.cloud.model.Location)

Example 52 with AuthenticatedContext

use of com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext in project cloudbreak by hortonworks.

the class AzureClientService method createAuthenticatedContext.

public AuthenticatedContext createAuthenticatedContext(CloudContext cloudContext, CloudCredential cloudCredential) {
    AuthenticatedContext authenticatedContext = new AuthenticatedContext(cloudContext, cloudCredential);
    AzureClient azureClient = getClient(cloudCredential);
    authenticatedContext.putParameter(AzureClient.class, azureClient);
    return authenticatedContext;
}
Also used : AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)

Aggregations

AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)52 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)34 Test (org.junit.Test)26 CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)20 InstanceAuthentication (com.sequenceiq.cloudbreak.cloud.model.InstanceAuthentication)19 CloudConnector (com.sequenceiq.cloudbreak.cloud.CloudConnector)18 AmazonEC2Client (com.amazonaws.services.ec2.AmazonEC2Client)17 Location (com.sequenceiq.cloudbreak.cloud.model.Location)17 DescribeSubnetsResult (com.amazonaws.services.ec2.model.DescribeSubnetsResult)15 Vpc (com.amazonaws.services.ec2.model.Vpc)15 Group (com.sequenceiq.cloudbreak.cloud.model.Group)15 Network (com.sequenceiq.cloudbreak.cloud.model.Network)15 HashMap (java.util.HashMap)15 DescribeVpcsResult (com.amazonaws.services.ec2.model.DescribeVpcsResult)14 Subnet (com.sequenceiq.cloudbreak.cloud.model.Subnet)14 ArrayList (java.util.ArrayList)11 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)10 Event (reactor.bus.Event)10 AmazonAutoScalingClient (com.amazonaws.services.autoscaling.AmazonAutoScalingClient)8 AwsCredentialView (com.sequenceiq.cloudbreak.cloud.aws.view.AwsCredentialView)8