> +
> +   @Inject
> +   public DockerComputeServiceAdapter(DockerApi api) {
> +      this.api = checkNotNull(api, "api");
> +   }
> +
> +   @Override
> +   public NodeAndInitialCredentials<Container> 
> createNodeWithGroupEncodedIntoName(String group, String name,
> +                                                                             
>      Template template) {
> +      checkNotNull(template, "template was null");
> +      checkNotNull(template.getOptions(), "template options was null");
> +      DockerTemplateOptions templateOptions = 
> DockerTemplateOptions.class.cast(template.getOptions());
> +
> +      String imageId = checkNotNull(template.getImage().getId(), "template 
> image id must not be null");
> +      String loginUser = 
> template.getImage().getDefaultCredentials().getUser();
> +      String loginUserPassword = 
> template.getImage().getDefaultCredentials().getPassword();

For further reference [this 
class](https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/strategy/impl/ReturnCredentialsBoundToImage.java)
 is the one that populates the default credentials to the images (you don't 
have to worry about that in the `ImageToImage` function, and [this is the 
one](https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java#L94-L95)
 that provides the default values, if no credentials are present, reading the 
value of the mentioned property.

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

Reply via email to