use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb 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.gcp.GcpLoadBalancerConfigDb 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());
}
use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb in project cloudbreak by hortonworks.
the class LoadBalancerToLoadBalancerResponseConverterTest method createGcpLoadBalancerConfig.
private LoadBalancerConfigDbWrapper createGcpLoadBalancerConfig() {
GcpLoadBalancerConfigDb gcpLoadBalancerConfigDb = new GcpLoadBalancerConfigDb();
gcpLoadBalancerConfigDb.setName(GCP_LB_NAME);
LoadBalancerConfigDbWrapper configDbWrapper = new LoadBalancerConfigDbWrapper();
configDbWrapper.setGcpConfig(gcpLoadBalancerConfigDb);
return configDbWrapper;
}
Aggregations