> + ruleBuilder.IpProtocol(ipPermission.getIpProtocol());
> + if (ipPermission.getToPort() > 0) {
> + ruleBuilder.addPortRange(ipPermission.getFromPort(),
> ipPermission.getToPort());
> + }
> + fwOptions.addAllowedRule(ruleBuilder.build());
> +
> + AtomicReference<Operation> operation = new
> AtomicReference<Operation>(api.getFirewallApiForProject(userProject
> + .get()).createInNetwork(
> + uniqueFwName,
> + group.getUri(),
> + fwOptions));
> +
> + retry(operationDonePredicate, operationCompleteCheckTimeout,
> operationCompleteCheckInterval,
> + MILLISECONDS).apply(operation);
> +
> + checkState(!operation.get().getHttpError().isPresent(), "Could not
> create firewall, operation failed" + operation);
Seems to be consistent with how we're doing networks/firewall creation in
GCE...but if you have a better suggestion, I'm open to it.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/5/files#r7385754