>              return input.get() != null;
>           }
>        }, operationCompleteCheckTimeout, operationCompleteCheckInterval, 
> MILLISECONDS).apply(instance);
>  
> -      return new NodeAndInitialCredentials<Instance>(instance.get(), name, 
> credentials);
> +      if (options.getTags().size() > 0) {
> +         Operation tagsOperation = 
> api.getInstanceApiForProject(userProject.get()).setTagsInZone(template.getLocation().getId(),
> +                 name, options.getTags(), 
> instance.get().getTags().getFingerprint());
> +
> +         waitOperationDone(tagsOperation);
> +
> +         retry(new Predicate<AtomicReference<Instance>>() {
> +            @Override
> +            public boolean apply(AtomicReference<Instance> input) {
> +               
> input.set(api.getInstanceApiForProject(userProject.get()).getInZone(template.getLocation().getId(),
> +                       name));

I'll be honest - no idea. I just copied this from the same logic above for the 
actual creation. I'm not even sure it's strictly needed, but went with a better 
safe than sorry approach - I'm quite open to tweaks.

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

Reply via email to