> +
> +   public Instance getWorkingInstance(String zone) {
> +      return getWorkingInstance(zone, UUID.randomUUID().toString(), "1", 1);
> +   }
> +
> +   private Instance awaitAvailable(Instance instance, InstanceApi iapi) {
> +      for (int n = 0; n < 40; n = n + 1) {
> +         Instance updatedInstance = iapi.get(instance.getId());
> +         if (updatedInstance.getStatus() == Instance.Status.ACTIVE)
> +            return updatedInstance;
> +         if (updatedInstance.getStatus() == Instance.Status.UNRECOGNIZED)
> +            return null; // fast fail
> +         try {
> +            Thread.sleep(15000);
> +         } catch (InterruptedException e) {
> +            logger.info(e.getStackTrace().toString());

Info or warn..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/12/files#r5111710

Reply via email to