> +      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()));
> +
> +         retry(operationDonePredicate, operationCompleteCheckTimeout, 
> operationCompleteCheckInterval,
> +                 MILLISECONDS).apply(operation);
> +
> +         checkState(!operation.get().getHttpError().isPresent(), "Could not 
> delete firewall, operation failed" + operation);

If we throw an error here, should we then stop deleting all the other 
firewalls? Also, is `IllegalStateException` the right thing here?

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

Reply via email to