Search in sources :

Example 1 with GcpLoadBalancerConfigDb

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;
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) GcpLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb)

Example 2 with GcpLoadBalancerConfigDb

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

Example 3 with GcpLoadBalancerConfigDb

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;
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) GcpLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.gcp.GcpLoadBalancerConfigDb)

Aggregations

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