> + if (from.getRole().getRoleSize() != null) {
> +
> builder.hardware(from(hardwares.get()).firstMatch(HardwarePredicates.idEquals(from.getRole().getRoleSize())).orNull());
> + }
> + if (from.getRole().getOSVirtualHardDisk() != null) {
> + String imageId =
> from.getRole().getOSVirtualHardDisk().getSourceImageName();
> + builder.imageId(imageId);
> + Image image =
> from(images.get()).firstMatch(ImagePredicates.idEquals(imageId)).orNull();
> + if (image != null) {
> + builder.operatingSystem(image.getOperatingSystem());
> + }
> + }
> +
> builder.status(deploymentStatusToStatus.get(from.getDeploymentStatus()));
> +
> +// builder.status(serverStateToNodeStatus.get(from.getState()));
> +
> builder.publicAddresses(ImmutableList.copyOf(Collections2.transform(from.getPublicIpAddresses(),
> toIpAddress)));
> + return builder.build();
The node should also try to populate the credentials. If the API does not
provide them, it is usually a good idea to read the credentials from the
jclouds credential store as done in
[DigitalOcean](https://github.com/jclouds/jclouds-labs/blob/master/digitalocean/src/main/java/org/jclouds/digitalocean/compute/functions/DropletToNodeMetadata.java#L115-L120).
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/132/files#r24748680