use of com.sequenceiq.environment.network.dao.domain.AzureNetwork in project cloudbreak by hortonworks.
the class EnvironmentTestData method newNetwork.
private static BaseNetwork newNetwork() {
AzureNetwork azureNetwork = new AzureNetwork();
azureNetwork.setNetworkId(NETWORK_ID);
return azureNetwork;
}
use of com.sequenceiq.environment.network.dao.domain.AzureNetwork in project cloudbreak by hortonworks.
the class AzureEnvironmentNetworkConverter method createProviderSpecificNetwork.
@Override
BaseNetwork createProviderSpecificNetwork(NetworkDto network) {
AzureNetwork azureNetwork = new AzureNetwork();
AzureParams azureParams = network.getAzure();
if (azureParams != null) {
azureNetwork.setNetworkId(azureParams.getNetworkId());
azureNetwork.setResourceGroupName(azureParams.getResourceGroupName());
azureNetwork.setNoPublicIp(azureParams.isNoPublicIp());
if (ServiceEndpointCreation.ENABLED_PRIVATE_ENDPOINT.equals(network.getServiceEndpointCreation())) {
azureNetwork.setDatabasePrivateDnsZoneId(azureParams.getDatabasePrivateDnsZoneId());
}
}
return azureNetwork;
}
use of com.sequenceiq.environment.network.dao.domain.AzureNetwork in project cloudbreak by hortonworks.
the class AzureEnvironmentNetworkConverter method setCreatedCloudNetwork.
@Override
public BaseNetwork setCreatedCloudNetwork(BaseNetwork baseNetwork, CreatedCloudNetwork createdCloudNetwork) {
AzureNetwork azureNetwork = (AzureNetwork) baseNetwork;
azureNetwork.setName(createdCloudNetwork.getStackName());
azureNetwork.setNetworkId(createdCloudNetwork.getNetworkId());
azureNetwork.setResourceGroupName(String.valueOf(createdCloudNetwork.getProperties().get("resourceGroupName")));
azureNetwork.setSubnetMetas(createdCloudNetwork.getSubnets().stream().collect(Collectors.toMap(CreatedSubnet::getSubnetId, subnet -> new CloudSubnet(subnet.getSubnetId(), subnet.getSubnetId(), subnet.getAvailabilityZone(), subnet.getCidr(), subnet.isPublicSubnet(), subnet.isMapPublicIpOnLaunch(), subnet.isIgwAvailable(), subnet.getType()))));
return azureNetwork;
}
use of com.sequenceiq.environment.network.dao.domain.AzureNetwork in project cloudbreak by hortonworks.
the class EnvironmentNetworkServiceTest method getNetwork.
private BaseNetwork getNetwork() {
AzureNetwork azureNetwork = new AzureNetwork();
azureNetwork.setNetworkId(NETWORK_ID);
return azureNetwork;
}
use of com.sequenceiq.environment.network.dao.domain.AzureNetwork in project cloudbreak by hortonworks.
the class NetworkCreationRequestFactoryTest method getNetwork.
private BaseNetwork getNetwork() {
AzureNetwork azureNetwork = new AzureNetwork();
azureNetwork.setNetworkId(String.valueOf(NETWORK_ID));
azureNetwork.setResourceGroupName(LEGACY_RG);
return azureNetwork;
}
Aggregations