> +
> + // Get the first available ip
> + Ip<?, ?> availableIp = get(network.listUnusedIps(), 0);
> + logger.debug(">> Found available %s ip %s",
> availableIp.getNetworkType().name().toLowerCase(),
> + availableIp.getIp());
> + ips.add(availableIp);
> + }
> +
> + // Assign all ips to the virtual machine
> + vm.setNics(ips);
> + } else {
> + Optional<PublicIp> publicIp =
> tryFind(template.getVirtualDatacenter().listPurchasedPublicIps(),
> + IpPredicates.<PublicIp> notUsed());
> + if (publicIp.isPresent()) {
> + logger.debug(">> Found available public ip %s",
> publicIp.get().getIp());
> + vm.setNics(Lists.<Ip<?, ?>> newArrayList(publicIp.get()));
`ImmutableList.of(...)`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/47/files#r8755814