jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Everett Toews <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Adds service predicates and more tests (#186)
Date Fri, 03 Apr 2015 20:20:22 GMT
> +import static com.google.common.base.Preconditions.checkNotNull;
> +import static java.util.concurrent.TimeUnit.SECONDS;
> +import static org.jclouds.util.Predicates2.retry;
> +
> +import org.jclouds.openstack.poppy.v1.domain.Service;
> +import org.jclouds.openstack.poppy.v1.domain.ServiceStatus;
> +import org.jclouds.openstack.poppy.v1.features.ServiceApi;
> +import com.google.common.base.Predicate;
> +
> +public class ServicePredicates {
> +   public static Predicate<Service> awaitDeployed(ServiceApi serviceApi) {
> +      StatusUpdatedPredicate statusPredicate = new StatusUpdatedPredicate(serviceApi,
ServiceStatus.DEPLOYED);
> +      return retry(statusPredicate, 1200, 15, 15, SECONDS);
> +   }
> +
> +   private static class StatusUpdatedPredicate implements Predicate<Service> {

Oops. I see that now. I think it was the name of the class that threw me. To me `StatusUpdatedPredicate`
says it has to do with a 'Updated' status. Search the other predicates packages and see if
this name is consistent with others. It should be inline with whatever is most consistent.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/186/files#r27753065
Mime
View raw message