> +         return group;
> +      }
> +
> +      FirewallOptions fwOptions = new FirewallOptions();
> +      String uniqueFwName = 
> namingConvention.createWithoutPrefix().uniqueNameForGroup(group.getName());
> +      fwOptions.name(uniqueFwName);
> +      fwOptions.network(group.getUri());
> +      if (ipPermission.getGroupIds().size() > 0) {
> +         fwOptions.sourceTags(ipPermission.getGroupIds());
> +      }
> +      if (ipPermission.getCidrBlocks().size() > 0) {
> +         fwOptions.sourceRanges(ipPermission.getCidrBlocks());
> +      }
> +      Firewall.Rule.Builder ruleBuilder = Firewall.Rule.builder();
> +      ruleBuilder.IpProtocol(ipPermission.getIpProtocol());
> +      if (ipPermission.getToPort() > 0) {

What is that otherwise? Looks like an illegal IP permission to me, or are 
negative "to" ports allowed? If not, a `checkArgument` at the beginning, or at 
least a logger warning here?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/5/files#r7379292

Reply via email to