> +   }
> +
> +   @Override
> +   public boolean removeSecurityGroup(String id) {
> +      checkNotNull(id, "id");
> +      if (api.getNetworkApiForProject(userProject.get()).get(id) == null) {
> +         return false;
> +      }
> +
> +      ListOptions options = new ListOptions.Builder().filter("network eq 
> .*/" + id);
> +
> +      FluentIterable<Firewall> fws = 
> api.getFirewallApiForProject(userProject.get()).list(options).concat();
> +
> +      for (Firewall fw : fws) {
> +         AtomicReference<Operation> operation = new 
> AtomicReference<Operation>(api.getFirewallApiForProject(userProject.get())
> +                 .delete(fw.getName()));

...and the retry is because I ran into annoying race conditions deleting 
firewalls sometimes, so I preferred to retry.

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

Reply via email to