use of com.sequenceiq.distrox.api.v1.distrox.model.network.mock.MockNetworkV1Parameters in project cloudbreak by hortonworks.
the class NetworkV1ToNetworkV4Converter method convertToMockNetworkV1Parameters.
private MockNetworkV1Parameters convertToMockNetworkV1Parameters(MockNetworkV4Parameters source) {
MockNetworkV1Parameters response = new MockNetworkV1Parameters();
response.setSubnetId(source.getSubnetId());
response.setVpcId(source.getVpcId());
response.setInternetGatewayId(source.getInternetGatewayId());
return response;
}
use of com.sequenceiq.distrox.api.v1.distrox.model.network.mock.MockNetworkV1Parameters in project cloudbreak by hortonworks.
the class NetworkV1ToNetworkV4Converter method convertToMockNetworkParams.
private MockNetworkV4Parameters convertToMockNetworkParams(Pair<MockNetworkV1Parameters, EnvironmentNetworkResponse> source) {
EnvironmentNetworkResponse value = source.getValue();
MockNetworkV1Parameters key = source.getKey();
MockNetworkV4Parameters params = new MockNetworkV4Parameters();
if (key != null) {
String subnetId = key.getSubnetId();
if (value != null) {
evaluateIfTrueDoOtherwise(subnetId, StringUtils::isNotEmpty, params::setSubnetId, s -> params.setSubnetId(value.getPreferedSubnetId()));
}
params.setInternetGatewayId(key.getInternetGatewayId());
params.setVpcId(key.getVpcId());
}
return params;
}
use of com.sequenceiq.distrox.api.v1.distrox.model.network.mock.MockNetworkV1Parameters in project cloudbreak by hortonworks.
the class MockCloudProvider method distroXNetworkParameters.
private MockNetworkV1Parameters distroXNetworkParameters() {
MockNetworkV1Parameters params = new MockNetworkV1Parameters();
params.setSubnetId(getSubnetId());
params.setInternetGatewayId(getInternetGatewayId());
params.setVpcId(getVpcId());
return params;
}
Aggregations