neykov commented on this pull request.


> @@ -130,6 +136,20 @@ protected CreateResourcesThenCreateNodes(
       return super.execute(group, count, template, goodNodes, badNodes, 
customizationResponses);
    }
 
+   // Azure requires that we pass it the VM password. Need to generate one if 
not overriden by the user.
+   private void generatePasswordIfNoneProvided(Template template) {
+      TemplateOptions options = template.getOptions();
+      if (options.getLoginPassword() == null) {
+         Optional<String> passwordOptional = 
template.getImage().getDefaultCredentials().getOptionalPassword();
+         if (passwordOptional.isPresent()) {

Didn't like it initially because it will generate a password regardless of 
whether used. But +1 for cleaner code. Updated.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/402#discussion_r126933224

Reply via email to