> + * assigned.
> + */
> + private void configureNetworking(VirtualMachine vm,
> VirtualApplianceCachingTemplate template, Datacenter datacenter,
> + TemplateOptions options) {
> +
> + if (!options.getNetworks().isEmpty()) {
> + List<Ip<?, ?>> ips = Lists.newArrayList();
> + Enterprise enterprise = adminService.getCurrentEnterprise();
> + Iterable<ExternalNetwork> externalNetworks =
> enterprise.listExternalNetworks(datacenter);
> +
> + for (String networkId : options.getNetworks()) {
> + Network<?> network =
> template.getVirtualDatacenter().getPrivateNetwork(Ints.tryParse(networkId));
> + if (network == null) {
> + // If the given network is not a private network, it should
> be an
> + // external one
> + network = find(externalNetworks, networkId(networkId));
`networkId(networkId)` looks a bit weird? `hasNetworkId`? `networkIdIs`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/47/files#r8755710