> + logger.trace("<< static NATed IPAddress(%s) to
> virtualMachine(%s)", ip.getId(), vm.getId());
> + vm =
> client.getVirtualMachineApi().getVirtualMachine(vm.getId());
> + List<Integer> ports =
> Ints.asList(templateOptions.getInboundPorts());
> + if (capabilities.getCloudStackVersion().startsWith("2")) {
> + logger.debug(">> setting up IP forwarding for
> IPAddress(%s) rules(%s)", ip.getId(), ports);
> + Set<IPForwardingRule> rules =
> setupPortForwardingRulesForIP.apply(ip, ports);
> + logger.trace("<< setup %d IP forwarding rules on
> IPAddress(%s)", rules.size(), ip.getId());
> + } else {
> + logger.debug(">> setting up firewall rules for
> IPAddress(%s) rules(%s)", ip.getId(), ports);
> + Set<FirewallRule> rules =
> setupFirewallRulesForIP.apply(ip, ports);
> + logger.trace("<< setup %d firewall rules on
> IPAddress(%s)", rules.size(), ip.getId());
> + }
> + }
> + }
> + } catch (RuntimeException re) {
> + logger.error("-- exception after node has been created, trying to
> destroy the created virtualMachine(%s)", vm.getId());
I didn't think that was necessary as the code rethrows the exception anyway,
might be confusing for the guys looking at the logs to get the same exception
twice in the logs?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/328/files#r11014882