use of com.sequenceiq.environment.network.dao.domain.MockNetwork in project cloudbreak by hortonworks.
the class MockEnvironmentNetworkConverter method setCreatedCloudNetwork.
@Override
public BaseNetwork setCreatedCloudNetwork(BaseNetwork baseNetwork, CreatedCloudNetwork createdCloudNetwork) {
MockNetwork mockNetwork = (MockNetwork) baseNetwork;
mockNetwork.setName(createdCloudNetwork.getStackName());
mockNetwork.setVpcId(createdCloudNetwork.getNetworkId());
mockNetwork.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 mockNetwork;
}
Aggregations