class StackToCloudStackConverter implements Converter<Stack, CloudStack> {

    public CloudInstance buildInstance(Stack stack, InstanceMetaData instanceMetaData, InstanceGroup instanceGroup,
            StackAuthentication stackAuthentication, Long privateId, InstanceStatus status) {
        ImageEntity imageEntity = imageService.getByStack(stack);
        return buildInstance(instanceMetaData, instanceGroup, stackAuthentication, privateId, status, imageEntity.getImageName(), stack.getEnvironmentCrn());
    }

}