Search in sources :

Example 1 with AzureLoadBalancerConfigDb

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb 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 2 with AzureLoadBalancerConfigDb

use of com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb 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 3 with AzureLoadBalancerConfigDb

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

the class LoadBalancerConfigConverterTest method testConvertAzureLoadBalancer.

@Test
public void testConvertAzureLoadBalancer() {
    CloudLoadBalancerMetadata cloudLoadBalancerMetadata = new CloudLoadBalancerMetadata.Builder().withParameters(createAzureParams(0)).build();
    LoadBalancerConfigDbWrapper cloudLoadBalancerConfigDbWrapper = underTest.convertLoadBalancer(AZURE, cloudLoadBalancerMetadata);
    assertNotNull(cloudLoadBalancerConfigDbWrapper.getAzureConfig());
    AzureLoadBalancerConfigDb azureLoadBalancerConfigDb = cloudLoadBalancerConfigDbWrapper.getAzureConfig();
    assertEquals(LB_NAME, azureLoadBalancerConfigDb.getName());
}
Also used : LoadBalancerConfigDbWrapper(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.LoadBalancerConfigDbWrapper) CloudLoadBalancerMetadata(com.sequenceiq.cloudbreak.cloud.model.CloudLoadBalancerMetadata) AzureLoadBalancerConfigDb(com.sequenceiq.cloudbreak.domain.stack.loadbalancer.azure.AzureLoadBalancerConfigDb) Test(org.junit.Test)

Aggregations

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