> @@ -65,8 +65,17 @@
>        if (launchSpec.getSecurityGroupIds().size() > 0)
>           options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
>        options.asType(checkNotNull(launchSpec.getInstanceType(), 
> "instanceType"));
> -      if (launchSpec.getSubnetId() != null)
> -         options.withSubnetId(launchSpec.getSubnetId());
> +      if (launchSpec.getSubnetId() != null){
> +         if (Boolean.TRUE.equals(launchSpec.isPublicIpAddressAssociated()))  
> {
> +            
> options.associatePublicIpAddressAndSubnetId(launchSpec.getSubnetId());
> +            if (launchSpec.getSecurityGroupIds().size() > 0){
> +                
> options.withSecurityGroupIdsForNetworkInterface(launchSpec.getSecurityGroupIds());
> +            }
> +         }
> +         else{
> +             options.withSubnetId(launchSpec.getSubnetId());
> +         }
> +      }

[minor] Style: add a space before the `{` in the conditionals and format the 
code to use a 3 space indent.

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

Reply via email to