use of com.microsoft.azure.management.network.Subnet in project cloudbreak by hortonworks.
the class AzureResourceConnector method getNumberOfAvailableIPsInSubnets.
private Map<String, Integer> getNumberOfAvailableIPsInSubnets(AzureClient client, Network network) {
Map<String, Integer> result = new HashMap<>();
String resourceGroup = network.getStringParameter("resourceGroupName");
String networkId = network.getStringParameter("networkId");
Collection<String> subnetIds = azureUtils.getCustomSubnetIds(network);
for (String subnetId : subnetIds) {
Subnet subnet = client.getSubnetProperties(resourceGroup, networkId, subnetId);
int available = getAvailableAddresses(subnet);
result.put(subnetId, available);
}
return result;
}
Aggregations