@Override public IdReference apply(IpConfiguration input) { return input.properties().publicIPAddress(); } }), notNull());
@Override public IdReference apply(IpConfiguration input) { return input.properties().publicIPAddress(); } }), notNull());
private Iterable<String> getPublicIpAddresses(List<NetworkInterface> networkInterfaces) { List<String> publicIpAddresses = Lists.newArrayList(); for (NetworkInterface networkInterfaceCardIdReference : networkInterfaces) { NetworkInterfaceCard networkInterfaceCard = getNetworkInterfaceCard(networkInterfaceCardIdReference); if (networkInterfaceCard != null && networkInterfaceCard.properties() != null && networkInterfaceCard.properties().ipConfigurations() != null) { for (IpConfiguration ipConfiguration : networkInterfaceCard.properties().ipConfigurations()) { if (ipConfiguration.properties().publicIPAddress() != null) { IdReference publicIpId = ipConfiguration.properties().publicIPAddress(); PublicIPAddress publicIp = api.getPublicIPAddressApi(publicIpId.resourceGroup()).get( publicIpId.name()); if (publicIp != null && publicIp.properties().ipAddress() != null) { publicIpAddresses.add(publicIp.properties().ipAddress()); } } } } } return publicIpAddresses; }
private Iterable<String> getPublicIpAddresses(List<NetworkInterface> networkInterfaces) { List<String> publicIpAddresses = Lists.newArrayList(); for (NetworkInterface networkInterfaceCardIdReference : networkInterfaces) { NetworkInterfaceCard networkInterfaceCard = getNetworkInterfaceCard(networkInterfaceCardIdReference); if (networkInterfaceCard != null && networkInterfaceCard.properties() != null && networkInterfaceCard.properties().ipConfigurations() != null) { for (IpConfiguration ipConfiguration : networkInterfaceCard.properties().ipConfigurations()) { if (ipConfiguration.properties().publicIPAddress() != null) { IdReference publicIpId = ipConfiguration.properties().publicIPAddress(); PublicIPAddress publicIp = api.getPublicIPAddressApi(publicIpId.resourceGroup()).get( publicIpId.name()); if (publicIp != null && publicIp.properties().ipAddress() != null) { publicIpAddresses.add(publicIp.properties().ipAddress()); } } } } } return publicIpAddresses; }