[ 
https://issues.apache.org/jira/browse/JCLOUDS-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130603#comment-15130603
 ] 

Chava Jurado commented on JCLOUDS-1068:
---------------------------------------

[~andreaturli] You are correct.  Both your sample and my sample can get 
UBUNTU_14_64.  However my issue is getting a private image by the global 
identifier (UUID). If I pass it a private image UUID like so:
{code}
Image image = compute.getImage("de305d54-75b4-431b-adb2-eb6b9e546014");
{code}

It works in 1.9.1 but not in 1.9.2.

When I run the MainApp example you provided in 1.9.1 I get the expected results:
{code}
{id=de305d54-75b4-431b-adb2-eb6b9e546014, 
providerId=de305d54-75b4-431b-adb2-eb6b9e546014, os={family=ubuntu, 
version=14.04, description=Ubuntu / Ubuntu / 14.04-64 Minimal for VSI, 
is64Bit=true}, description=UBUNTU_14_64, status=AVAILABLE, loginUser=root}
{code}

When I run MainApp again using 1.9.2 I get the unexpected results:
{code}
{id=UBUNTU_14_64, providerId=UBUNTU_14_64, os={family=ubuntu, version=14.04, 
description=Ubuntu / Ubuntu / 14.04-64 Minimal for VSI, is64Bit=true}, 
description=UBUNTU_14_64, status=AVAILABLE, loginUser=root}
{code}

It returns UBUNTU_14_64 even though I requested a different image.

> Softlayer context.getComputeService().getImage() does not work in 1.9.2 like 
> it did in 1.9.1
> --------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1068
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1068
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 1.9.2
>            Reporter: Chava Jurado
>            Priority: Minor
>              Labels: softlayer
>
> In 1.9.1 the following code can retrieve a private image by global id, but in 
> 1.9.2 it returns UBUNTU_14_64.
> {code:title=Softlayer Example|borderStyle=solid}
> import java.util.Properties;
> import org.jclouds.ContextBuilder;
> import org.jclouds.compute.ComputeServiceContext;
> import org.jclouds.compute.domain.Image;
> import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
> import com.google.common.collect.ImmutableSet;
> import com.google.inject.Module;
> public class SoftlayerExample {
>       public static void main(String[] args) {
>               String identity = "SLxxxxxx"; //accountName
>               String identityCredential = ""; //apiKey
>               String imageId = ""; //globalIdentifier
>               Properties overrides = new Properties();
>               ImmutableSet<Module> modules = ImmutableSet
>                               .<Module> of(new SLF4JLoggingModule());
>               ComputeServiceContext context = 
> ContextBuilder.newBuilder("softlayer")
>                               .credentials(identity, 
> identityCredential).overrides(overrides)
>                               
> .modules(modules).buildView(ComputeServiceContext.class);
>               Image image = context.getComputeService().getImage(imageId);
>               System.out.println(image.getId());
>               if (!image.getId().matches(imageId)) {
>                       System.out.println("No workie in 1.9.2 :(");
>               }
>       }
> }
> {code}
> Looking at the API calls returned by Softlayer in 1.9.1 and 1.9.2, they are 
> identical.  Both are able to get the information from softlayer, but for some 
> reason the object returned in 1.9.2 is a base ubuntu image.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to