> +        private final OneAndOneApi api;
> +
> +        public PrivateNetworkReadyPredicate(OneAndOneApi api) {
> +            this.api = checkNotNull(api, "api must not be null");
> +        }
> +
> +        @Override
> +        public boolean apply(ServerPrivateNetworkRef networkRef) {
> +            checkNotNull(networkRef, "ServerPrivateNetworkRef");
> +            PrivateNetwork server = 
> api.serverApi().getPrivateNetwork(networkRef.serverId(), 
> networkRef.privateNetworkId());
> +
> +            if (server.state() != Types.GenericState.ACTIVE) {
> +                return false;
> +            } else {
> +                return true;
> +            }

Just `return server.state() == Types.GenericState.ACTIVE`? Apply this to the 
other similar conditionals.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/275/files/2aeb10a4b8128cd34a9a16ade5119e7b68c1be24#r69216777

Reply via email to