> +                try {
> +                    cloned = cloneMaster(master, tag, name, cloneSpec);
> +                    Set<String> tagsFromOption = vOptions.getTags();
> +                    if (tagsFromOption.size() > 0) {
> +                        StringBuilder tags = new StringBuilder();
> +                        for (String vmTag : vOptions.getTags()) {
> +                            tags.append(vmTag).append(",");
> +                        }
> +                        tags.deleteCharAt(tags.length() - 1);
> +
> +                        
> cloned.getServerConnection().getServiceInstance().getCustomFieldsManager().setField(cloned,
>  customFields.get().get(VSphereConstants.JCLOUDS_TAGS).getKey(), 
> tags.toString());
> +                        
> cloned.getServerConnection().getServiceInstance().getCustomFieldsManager().setField(cloned,
>  customFields.get().get(VSphereConstants.JCLOUDS_GROUP).getKey(), tag);
> +                        if (vOptions.postConfiguration())
> +                            postConfiguration(cloned, name, tag, 
> networkConfigs);
> +                        else {
> +                            while (! 
> (cloned.getGuest().getToolsStatus().equals(VirtualMachineToolsStatus.toolsOk) 
> ||

Change the wait logic to use the `Predicates2.retry` mechanism.

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

Reply via email to