> +    * @param size
> +    *           Size of the instance
> +    * @return Instance object in active state or NULL
> +    */
> +   public Instance getWorkingInstance(String zone, String name, String 
> flavorId, int size) {
> +      InstanceApi instanceApi = api.getInstanceApiForZone(zone);
> +      for (int retries = 0; retries < 10; retries++) {
> +         Instance instance = null;
> +         try {
> +            instance = instanceApi.create(flavorId, size, name);
> +         } catch (Exception e) {
> +
> +            try {
> +               Thread.sleep(50);
> +            } catch (InterruptedException ie) {
> +            }

Supposedly guava has sleepUninterruptibly. I have not used it before.

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

Reply via email to