> +                PublicIPAddress ip = 
> staticNATVMInNetwork.create(networks.get(networkId)).apply(vm);
> +                logger.trace("<< static NATed IPAddress(%s) to 
> virtualMachine(%s)", ip.getId(), vm.getId());
> +                vm = 
> client.getVirtualMachineClient().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) {

Personally, I think that scope is a little too broad, then - if we're trying to 
be smart not just on failures in provider calls, but arbitrary programming 
problems or even programming bugs in jclouds such as NPEs, we should think 
about that differently and not patch one single call to one single provider.

Would be curious to hear what others think about this. @abayer, @adriancole 
...any thoughts?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/184/files#r7003820

Reply via email to