jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chava Jurado (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 02:07:18 GMT

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

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

[~andreaturli]  The change to how you build the image (Line 85) in https://github.com/jclouds/jclouds/blob/rel/jclouds-1.9.2/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/OperatingSystemToImage.java
is what is causing my image to be replaced with a default ubuntu one.  

1.9.1
{code}
.ids(operatingSystem.getId())
{code}

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

That comparison is choosing an ubuntu base image over the private 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)

Mime
View raw message