nacx 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()) { It's only a syntactic sugar. You have also the supplier option, but it is not that readable then. I'm OK with keeping unchanged :) Feel free to merge your preferred version. -- 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_r126933825