Search in sources :

Example 1 with LoadBalancerConfigDbWrapper

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

the class LoadBalancerConfigConverter method buildGcpConfig.

private LoadBalancerConfigDbWrapper buildGcpConfig(GcpLoadBalancerMetadataView gcpMetadata) {
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = new LoadBalancerConfigDbWrapper();
    GcpLoadBalancerConfigDb gcpLoadBalancerConfigDb = new GcpLoadBalancerConfigDb();
    gcpLoadBalancerConfigDb.setName(gcpMetadata.getLoadbalancerName());
    cloudLoadBalancerConfigDbWrapper.setGcpConfig(gcpLoadBalancerConfigDb);
    return cloudLoadBalancerConfigDbWrapper;
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) GcpLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb)

Example 2 with LoadBalancerConfigDbWrapper

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

the class LoadBalancerConfigConverter method buildAzureConfig.

private LoadBalancerConfigDbWrapper buildAzureConfig(AzureLoadBalancerMetadataView azureMetadata) {
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = new LoadBalancerConfigDbWrapper();
    AzureLoadBalancerConfigDb azureLoadBalancerConfigDb = new AzureLoadBalancerConfigDb();
    azureLoadBalancerConfigDb.setName(azureMetadata.getLoadbalancerName());
    cloudLoadBalancerConfigDbWrapper.setAzureConfig(azureLoadBalancerConfigDb);
    return cloudLoadBalancerConfigDbWrapper;
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) AzureLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb)

Example 3 with LoadBalancerConfigDbWrapper

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

the class LoadBalancerToLoadBalancerResponseConverterTest method createAzureLoadBalancerConfig.

private LoadBalancerConfigDbWrapper createAzureLoadBalancerConfig() {
    AzureLoadBalancerConfigDb azureLoadBalancerConfigDb = new AzureLoadBalancerConfigDb();
    azureLoadBalancerConfigDb.setName(AZURE_LB_NAME);
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = new LoadBalancerConfigDbWrapper();
    cloudLoadBalancerConfigDbWrapper.setAzureConfig(azureLoadBalancerConfigDb);
    return cloudLoadBalancerConfigDbWrapper;
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) AzureLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb)

Example 4 with LoadBalancerConfigDbWrapper

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper 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 5 with LoadBalancerConfigDbWrapper

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

the class LoadBalancerConfigConverterTest method testConvertGcpLoadBalancer.

@Test
public void testConvertGcpLoadBalancer() {
    CloudLoadBalancerMetadata cloudLoadBalancerMetadata = new CloudLoadBalancerMetadata.Builder().withParameters(creatGcpParams(0)).build();
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = underTest.convertLoadBalancer(GCP, cloudLoadBalancerMetadata);
    assertNotNull(cloudLoadBalancerConfigDbWrapper.getGcpConfig());
    GcpLoadBalancerConfigDb gcpLoadBalancerConfigDb = cloudLoadBalancerConfigDbWrapper.getGcpConfig();
    assertEquals(LB_NAME, gcpLoadBalancerConfigDb.getName());
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) GcpLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb) CloudLoadBalancerMetadata(com.sequenceiq.cloudbreak.cloud.model.CloudLoadBalancerMetadata) Test(org.junit.Test)

Aggregations

LoadBalancerConfigDbWrapper (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper)9 CloudLoadBalancerMetadata (com.sequenceiq.cloudbreak.cloud.model.CloudLoadBalancerMetadata)3 AwsLoadBalancerConfigDb (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.aws.AwsLoadBalancerConfigDb)3 AzureLoadBalancerConfigDb (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb)3 GcpLoadBalancerConfigDb (com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb)3 Test (org.junit.Test)3