use of com.sequenceiq.distrox.api.v1.distrox.model.network.gcp.GcpNetworkV1Parameters in project cloudbreak by hortonworks.
the class NetworkV1ToNetworkV4Converter method convertToGcpNetworkV1Parameters.
private GcpNetworkV1Parameters convertToGcpNetworkV1Parameters(GcpNetworkV4Parameters source) {
GcpNetworkV1Parameters response = new GcpNetworkV1Parameters();
response.setSubnetId(source.getSubnetId());
return response;
}
use of com.sequenceiq.distrox.api.v1.distrox.model.network.gcp.GcpNetworkV1Parameters in project cloudbreak by hortonworks.
the class NetworkV1ToNetworkV4Converter method convertToGcpStackRequest.
private GcpNetworkV4Parameters convertToGcpStackRequest(Pair<GcpNetworkV1Parameters, EnvironmentNetworkResponse> source) {
EnvironmentNetworkResponse value = source.getValue();
GcpNetworkV1Parameters key = source.getKey();
GcpNetworkV4Parameters response = new GcpNetworkV4Parameters();
if (key != null) {
response.setNetworkId(value.getGcp().getNetworkId());
response.setNoFirewallRules(value.getGcp().getNoFirewallRules());
response.setNoPublicIp(value.getGcp().getNoPublicIp());
response.setSharedProjectId(value.getGcp().getSharedProjectId());
String subnetId = key.getSubnetId();
if (!Strings.isNullOrEmpty(subnetId)) {
response.setSubnetId(subnetId);
} else {
response.setSubnetId(getFirstSubnetIdFromEnvironment(value));
}
}
return response;
}
Aggregations