jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Turli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1068) Softlayer context.getComputeService().getImage() does not work in 1.9.2 like it did in 1.9.1
Date Tue, 09 Feb 2016 11:45:18 GMT

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

Andrea Turli commented on JCLOUDS-1068:
---------------------------------------

Nice spot!

would 
{code}
.ids(operatingSystem.getId().or(optOSReferenceCode))
{code}

fix the issue?

If yes, mind opening a PR for that?
Thanks!

> 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)

Mime
View raw message