Search in sources :

Example 1 with AwsLoadBalancerConfigDb

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb in project cloudbreak by hortonworks.

the class LoadBalancerToLoadBalancerResponseConverterTest method createAwsLoadBalancerConfig.

private LoadBalancerConfigDbWrapper createAwsLoadBalancerConfig() {
    AwsLoadBalancerConfigDb awsLoadBalancerConfigDb = new AwsLoadBalancerConfigDb();
    awsLoadBalancerConfigDb.setArn(LB_ARN);
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = new LoadBalancerConfigDbWrapper();
    cloudLoadBalancerConfigDbWrapper.setAwsConfig(awsLoadBalancerConfigDb);
    return cloudLoadBalancerConfigDbWrapper;
}
Also used : AwsLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb) LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper)

Example 2 with AwsLoadBalancerConfigDb

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb in project cloudbreak by hortonworks.

the class LoadBalancerConfigConverterTest method testConvertAwsLoadBalancer.

@Test
public void testConvertAwsLoadBalancer() {
    CloudLoadBalancerMetadata cloudLoadBalancerMetadata = new CloudLoadBalancerMetadata.Builder().withParameters(createAwsParams(0)).build();
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = underTest.convertLoadBalancer(AWS, cloudLoadBalancerMetadata);
    assertNotNull(cloudLoadBalancerConfigDbWrapper.getAwsConfig());
    AwsLoadBalancerConfigDb awsLoadBalancerConfigDb = cloudLoadBalancerConfigDbWrapper.getAwsConfig();
    assertEquals(LB_ARN, awsLoadBalancerConfigDb.getArn());
}
Also used : AwsLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb) LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) CloudLoadBalancerMetadata(com.sequenceiq.cloudbreak.cloud.model.CloudLoadBalancerMetadata) Test(org.junit.Test)

Example 3 with AwsLoadBalancerConfigDb

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb in project cloudbreak by hortonworks.

the class LoadBalancerConfigConverter method buildAwsConfig.

private LoadBalancerConfigDbWrapper buildAwsConfig(AwsLoadBalancerMetadataView awsMetadata) {
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = new LoadBalancerConfigDbWrapper();
    AwsLoadBalancerConfigDb awsLoadBalancerConfigDb = new AwsLoadBalancerConfigDb();
    awsLoadBalancerConfigDb.setArn(awsMetadata.getLoadbalancerArn());
    cloudLoadBalancerConfigDbWrapper.setAwsConfig(awsLoadBalancerConfigDb);
    return cloudLoadBalancerConfigDbWrapper;
}
Also used : AwsLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb) LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper)

Aggregations

LoadBalancerConfigDbWrapper (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper)3 AwsLoadBalancerConfigDb (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb)3 CloudLoadBalancerMetadata (com.sequenceiq.cloudbreak.cloud.model.CloudLoadBalancerMetadata)1 Test (org.junit.Test)1