}
} else {
for (ResourceAllocationSettingData net : filter(vm.getVirtualHardwareSection().getItems(),
CIMPredicates.resourceTypeIn(ResourceType.ETHERNET_ADAPTER))) {
if (net instanceof VCloudNetworkAdapter) {
VCloudNetworkAdapter vNet = VCloudNetworkAdapter.class.cast(net);
if (vNet.getIpAddress() != null)
ips.add(vNet.getIpAddress());
}
}
}
return ips.build();
}