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