> +                    .get()).createInIPv4RangeWithGateway(input.getName(), 
> input.getIpV4Range(), input.getGateway().get()));
> +            retry(operationDonePredicate, operationCompleteCheckTimeout, 
> operationCompleteCheckInterval,
> +                    MILLISECONDS).apply(operation);
> +
> +            checkState(!operation.get().getHttpError().isPresent(), "Could 
> not create network, operation failed" + operation);
> +         } else {
> +            AtomicReference<Operation> operation = new 
> AtomicReference<Operation>(api.getNetworkApiForProject(userProject
> +                    .get()).createInIPv4Range(input.getName(), 
> input.getIpV4Range()));
> +            retry(operationDonePredicate, operationCompleteCheckTimeout, 
> operationCompleteCheckInterval,
> +                    MILLISECONDS).apply(operation);
> +
> +            checkState(!operation.get().getHttpError().isPresent(), "Could 
> not create network, operation failed" + operation);
> +         }
> +         return 
> checkNotNull(api.getNetworkApiForProject(userProject.get()).get(input.getName()),
> +                 "no network with name %s was found", input.getName());
> +      } catch (IllegalStateException e) {

I honestly forget what the logic was here. Lemme play with this a bit...

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

Reply via email to