Search in sources :

Example 1 with AzureNetworkV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters in project cloudbreak by hortonworks.

the class NetworkV1ToNetworkV4ConverterTest method azureNetworkV1Request.

private NetworkV1Request azureNetworkV1Request() {
    NetworkV1Request networkV1Request = new NetworkV1Request();
    AzureNetworkV1Parameters azureNetworkV1Parameters = new AzureNetworkV1Parameters();
    azureNetworkV1Parameters.setSubnetId(SUBNET_ID);
    networkV1Request.setAzure(azureNetworkV1Parameters);
    return networkV1Request;
}
Also used : AzureNetworkV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters) NetworkV1Request(com.sequenceiq.distrox.api.v1.distrox.model.network.NetworkV1Request)

Example 2 with AzureNetworkV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters in project cloudbreak by hortonworks.

the class NetworkV1ToNetworkV4ConverterTest method azureEmptyNetworkV1Request.

private NetworkV1Request azureEmptyNetworkV1Request() {
    NetworkV1Request networkV1Request = new NetworkV1Request();
    AzureNetworkV1Parameters azureNetworkV1Parameters = new AzureNetworkV1Parameters();
    networkV1Request.setAzure(azureNetworkV1Parameters);
    return networkV1Request;
}
Also used : AzureNetworkV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters) NetworkV1Request(com.sequenceiq.distrox.api.v1.distrox.model.network.NetworkV1Request)

Example 3 with AzureNetworkV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters in project cloudbreak by hortonworks.

the class NetworkV1ToNetworkV4Converter method convertToAzureNetworkV1Parameters.

private AzureNetworkV1Parameters convertToAzureNetworkV1Parameters(AzureNetworkV4Parameters source) {
    AzureNetworkV1Parameters response = new AzureNetworkV1Parameters();
    response.setSubnetId(source.getSubnetId());
    return response;
}
Also used : AzureNetworkV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters)

Example 4 with AzureNetworkV1Parameters

use of com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters in project cloudbreak by hortonworks.

the class NetworkV1ToNetworkV4Converter method convertToAzureStackRequest.

private AzureNetworkV4Parameters convertToAzureStackRequest(Pair<AzureNetworkV1Parameters, EnvironmentNetworkResponse> source) {
    EnvironmentNetworkResponse value = source.getValue();
    AzureNetworkV1Parameters key = source.getKey();
    AzureNetworkV4Parameters response = new AzureNetworkV4Parameters();
    if (key != null) {
        response.setNetworkId(value.getAzure().getNetworkId());
        response.setNoPublicIp(value.getAzure().getNoPublicIp());
        response.setResourceGroupName(value.getAzure().getResourceGroupName());
        response.setDatabasePrivateDnsZoneId(value.getAzure().getDatabasePrivateDnsZoneId());
        String subnetId = key.getSubnetId();
        if (!Strings.isNullOrEmpty(subnetId)) {
            response.setSubnetId(subnetId);
        } else if (source.getValue() != null) {
            response.setSubnetId(source.getValue().getPreferedSubnetId());
        }
    }
    return response;
}
Also used : AzureNetworkV1Parameters(com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters) AzureNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AzureNetworkV4Parameters) EnvironmentNetworkResponse(com.sequenceiq.environment.api.v1.environment.model.response.EnvironmentNetworkResponse)

Aggregations

AzureNetworkV1Parameters (com.sequenceiq.distrox.api.v1.distrox.model.network.azure.AzureNetworkV1Parameters)4 NetworkV1Request (com.sequenceiq.distrox.api.v1.distrox.model.network.NetworkV1Request)2 AzureNetworkV4Parameters (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AzureNetworkV4Parameters)1 EnvironmentNetworkResponse (com.sequenceiq.environment.api.v1.environment.model.response.EnvironmentNetworkResponse)1