Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1068

Softlayer context.getComputeService().getImage() does not work in 1.9.2 like it did in 1.9.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.9.2
    • None
    • jclouds-compute

    Description

      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.

      Softlayer Example
      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 :(");
      		}
      	}
      }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            chjurado Chava Jurado
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: