From b75b0c28d62df82b94747ed2556ffc6226c83a2d Mon Sep 17 00:00:00 2001 From: Andrea Turli Date: Tue, 9 Dec 2014 09:17:07 +0100 Subject: [PATCH] JCLOUDS-813: fix list private images modify the listImages and getImage strategies in SoftLayerComputeServiceAdapter add support for VirtualGuestBlockDeviceTemplateGroupApi getObject remove PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES add Expect and Live tests for VirtualGuestBlockDeviceTemplateGroup.getObject --- .../softlayer/SoftLayerProviderMetadata.java | 4 +- .../SoftLayerComputeServiceContextModule.java | 3 +- .../SoftLayerComputeServiceAdapter.java | 57 +- ...rtualGuestBlockDeviceTemplateGroupApi.java | 19 +- .../reference/SoftLayerConstants.java | 5 - ...oftLayerComputeServiceContextLiveTest.java | 6 +- ...BlockDeviceTemplateGroupApiExpectTest.java | 31 +- ...stBlockDeviceTemplateGroupApiLiveTest.java | 25 +- ...tBlockDeviceTemplateGroupResponseTest.java | 212 ++++++ .../parse/ListPublicImagesResponseTest.java | 2 +- ...guest_block_device_template_group_get.json | 709 ++++++++++++++++++ ...ice_template_group_get_public_images.json} | 0 12 files changed, 1017 insertions(+), 56 deletions(-) create mode 100644 providers/softlayer/src/test/java/org/jclouds/softlayer/parse/GetVirtualGuestBlockDeviceTemplateGroupResponseTest.java create mode 100644 providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get.json rename providers/softlayer/src/test/resources/{virtualGuestBlockDeviceTemplateGroup_public_images.json => virtual_guest_block_device_template_group_get_public_images.json} (100%) diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerProviderMetadata.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerProviderMetadata.java index 2fbfe44a049..7804bb84aef 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerProviderMetadata.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerProviderMetadata.java @@ -17,7 +17,6 @@ package org.jclouds.softlayer; import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE; -import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES; import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY; import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_VIRTUALGUEST_LOGIN_DETAILS_DELAY; @@ -56,8 +55,7 @@ public static Properties defaultProperties() { Properties properties = new Properties(); properties.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_LOGIN_DETAILS_DELAY, "" + 60 * 60 * 1000); properties.setProperty(PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY, "" + 3 * 60 * 1000); - properties.setProperty(PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES, "false"); - properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=1[012].[01][04],os64Bit=true"); + properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=1[01234].[01][04],os64Bit=true"); return properties; } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java index e2bf26a3ee6..89589fbf764 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java @@ -71,7 +71,8 @@ protected void configure() { }).to(DatacenterToLocation.class); bind(TemplateOptions.class).to(SoftLayerTemplateOptions.class); // to have the compute service adapter override default locations - install(new LocationsFromComputeServiceAdapterModule(){}); + install(new LocationsFromComputeServiceAdapterModule() { + }); } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java index e7189af1b4a..835329b7f87 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java @@ -21,7 +21,6 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.contains; import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.find; import static com.google.common.collect.Iterables.get; import static com.google.common.collect.Iterables.tryFind; import static java.lang.Math.round; @@ -29,13 +28,13 @@ import static org.jclouds.compute.domain.Volume.Type; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.jclouds.compute.util.ComputeServiceUtils.getSpace; -import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES; import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY; import static org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_VIRTUALGUEST_LOGIN_DETAILS_DELAY; import static org.jclouds.util.Predicates2.retry; import java.util.Comparator; import java.util.List; import java.util.Set; +import java.util.concurrent.TimeUnit; import javax.annotation.Resource; import javax.inject.Inject; @@ -75,6 +74,7 @@ import com.google.common.base.Function; import com.google.common.base.Optional; import com.google.common.base.Predicate; +import com.google.common.base.Stopwatch; import com.google.common.base.Supplier; import com.google.common.collect.ComparisonChain; import com.google.common.collect.FluentIterable; @@ -105,19 +105,16 @@ public class SoftLayerComputeServiceAdapter implements private final Predicate loginDetailsTester; private final long guestLoginDelay; private final long activeTransactionsDelay; - private final boolean includePublicImages; @Inject public SoftLayerComputeServiceAdapter(SoftLayerApi api, VirtualGuestHasLoginDetailsPresent virtualGuestHasLoginDetailsPresent, @Memoized Supplier createObjectOptionsSupplier, @Named(PROPERTY_SOFTLAYER_VIRTUALGUEST_LOGIN_DETAILS_DELAY) long guestLoginDelay, - @Named(PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY) long activeTransactionsDelay, - @Named(PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES) boolean includePublicImages) { + @Named(PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY) long activeTransactionsDelay) { this.api = checkNotNull(api, "api"); this.guestLoginDelay = checkNotNull(guestLoginDelay, "guestLoginDelay"); this.activeTransactionsDelay = checkNotNull(activeTransactionsDelay, "activeTransactionsDelay"); - this.includePublicImages = checkNotNull(includePublicImages, "includePublicImages"); this.createObjectOptionsSupplier = checkNotNull(createObjectOptionsSupplier, "createObjectOptionsSupplier"); checkArgument(guestLoginDelay > 500, "guestOrderDelay must be in milliseconds and greater than 500"); this.loginDetailsTester = retry(virtualGuestHasLoginDetailsPresent, guestLoginDelay); @@ -153,7 +150,7 @@ public NodeAndInitialCredentials createNodeWithGroupEncodedIntoNam Optional optionalOperatingSystem = tryExtractOperatingSystemFrom(imageId); if (optionalOperatingSystem.isPresent()) { virtualGuestBuilder.operatingSystem(optionalOperatingSystem.get()); - // the imageId specified is a the id of a public/private/flex image + // the imageId specified is an id of a public/private/flex image } else { VirtualGuestBlockDeviceTemplateGroup blockDeviceTemplateGroup = VirtualGuestBlockDeviceTemplateGroup .builder().globalIdentifier(imageId).build(); @@ -284,28 +281,8 @@ public int compare(Hardware h1, Hardware h2) { @Override public Set listImages() { Set result = Sets.newHashSet(); - Set allObjects = api.getSoftwareDescriptionApi().getAllObjects(); - - // add private images - Set privateImages = api.getAccountApi().getBlockDeviceTemplateGroups(); - for (VirtualGuestBlockDeviceTemplateGroup privateImage : privateImages) { - Optional operatingSystemOptional = tryExtractOperatingSystemFrom(privateImage); - if (operatingSystemOptional.isPresent()) { - result.add(operatingSystemOptional.get()); - } - } - - if (includePublicImages) { - Set publicImages = api.getVirtualGuestBlockDeviceTemplateGroupApi().getPublicImages(); - for (VirtualGuestBlockDeviceTemplateGroup publicImage : publicImages) { - Optional operatingSystemOptional = tryExtractOperatingSystemFrom(publicImage); - if (operatingSystemOptional.isPresent()) { - result.add(operatingSystemOptional.get()); - } - } - } - // add allObjects filtered by the available OS + Set allObjects = api.getSoftwareDescriptionApi().getAllObjects(); for (OperatingSystem os : createObjectOptionsSupplier.get().getVirtualGuestOperatingSystems()) { result.addAll(FluentIterable.from(allObjects) .filter(new IsOperatingSystem()) @@ -318,13 +295,22 @@ public Set listImages() { @Override public OperatingSystem getImage(final String id) { - return find(listImages(), new Predicate() { - - @Override - public boolean apply(OperatingSystem input) { - return input.getId().equals(id); - } - }, null); + // look for imageId among stock images + Optional operatingSystemOptional = tryFind(listImages(), + new Predicate() { + @Override + public boolean apply(OperatingSystem input) { + return input.getId().equals(id); + } + } + ); + if (operatingSystemOptional.isPresent()) return operatingSystemOptional.get(); + + // if imageId is not a stock image, it searches among private and public images + Stopwatch stopwatch = Stopwatch.createStarted(); + VirtualGuestBlockDeviceTemplateGroup image = api.getVirtualGuestBlockDeviceTemplateGroupApi().getObject(id); + logger.trace("<< Image(%s) found in (%s)", id, stopwatch.elapsed(TimeUnit.SECONDS)); + return tryExtractOperatingSystemFrom(image).orNull(); } @Override @@ -450,6 +436,7 @@ public boolean apply(OperatingSystem input) { } private Optional tryExtractOperatingSystemFrom(VirtualGuestBlockDeviceTemplateGroup image) { + if (image.getGlobalIdentifier() == null) return Optional.absent(); return FluentIterable.from(image.getChildren()) .transformAndConcat(new BlockDeviceTemplateGroupToBlockDeviceTemplateIterable()) .filter(new IsBootableDevice()) diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApi.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApi.java index 69941b70909..56a6030ada1 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApi.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApi.java @@ -22,6 +22,7 @@ import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import org.jclouds.Fallbacks; @@ -42,7 +43,7 @@ @Consumes(MediaType.APPLICATION_JSON) public interface VirtualGuestBlockDeviceTemplateGroupApi { - String LIST_PUBLIC_IMAGES_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription"; + String MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription"; /** * @return public images @@ -51,8 +52,22 @@ public interface VirtualGuestBlockDeviceTemplateGroupApi { @Named("VirtualGuestBlockDeviceTemplateGroup:getPublicImages") @GET @Path("/SoftLayer_Virtual_Guest_Block_Device_Template_Group/getPublicImages") - @QueryParams(keys = "objectMask", values = LIST_PUBLIC_IMAGES_MASK) + @QueryParams(keys = "objectMask", values = MASK) @Fallback(Fallbacks.EmptySetOnNotFoundOr404.class) Set getPublicImages(); + /** + * Retrieves a virtual block device template group structure. It consists of a parent template group which contain + * multiple child template group objects. + * Each child template group object represents the image template in a particular location. + * + * @return a virtual block device template group + * @see + */ + @Named("VirtualGuestBlockDeviceTemplateGroup:getObject") + @GET + @Path("/SoftLayer_Virtual_Guest_Block_Device_Template_Group/{id}/getObject") + @QueryParams(keys = "objectMask", values = MASK) + @Fallback(Fallbacks.NullOnNotFoundOr404.class) + VirtualGuestBlockDeviceTemplateGroup getObject(@PathParam("id") String id); } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java index 71d924a15eb..595c1adfba9 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java @@ -35,11 +35,6 @@ public final class SoftLayerConstants { public static final String PROPERTY_SOFTLAYER_VIRTUALGUEST_ACTIVE_TRANSACTIONS_DELAY = "jclouds.softlayer" + ".virtualguest.active_transactions_delay"; - /** - * By default, list images will now consider the public images - */ - public static final String PROPERTY_SOFTLAYER_INCLUDE_PUBLIC_IMAGES = "jclouds.softlayer.include_public_images"; - private SoftLayerConstants() { throw new AssertionError("intentionally unimplemented"); } diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceContextLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceContextLiveTest.java index 3dd2ad170e5..f5c29d6abaa 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceContextLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceContextLiveTest.java @@ -62,16 +62,12 @@ public void testLaunchClusterWithMinDisk() throws RunNodesException { .build(ComputeServiceContext.class); TemplateBuilder templateBuilder = context.getComputeService().templateBuilder(); - templateBuilder.imageId("CENTOS_6_64"); - templateBuilder.locationId("dal01"); Template template = templateBuilder.build(); // test passing custom options SoftLayerTemplateOptions options = template.getOptions().as(SoftLayerTemplateOptions.class); options.domainName("live.org"); - // multi-disk option - //options.blockDevices(ImmutableList.of(25, 400, 400)); - //options.diskType("SAN"); + //tags options.tags(ImmutableList.of("jclouds")); Set nodes = context.getComputeService().createNodesInGroup(name, numNodes, template); diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiExpectTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiExpectTest.java index ba92f382630..26278410872 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiExpectTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiExpectTest.java @@ -17,11 +17,13 @@ package org.jclouds.softlayer.features; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.softlayer.SoftLayerApi; +import org.jclouds.softlayer.parse.GetVirtualGuestBlockDeviceTemplateGroupResponseTest; import org.jclouds.softlayer.parse.ListPublicImagesResponseTest; import org.testng.annotations.Test; @@ -38,7 +40,7 @@ public void testListPublicImagesWhenResponseIs2xx() { .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(); HttpResponse listPublicImagesResponse = HttpResponse.builder().statusCode(200) - .payload(payloadFromResource("/virtualGuestBlockDeviceTemplateGroup_public_images.json")).build(); + .payload(payloadFromResource("/virtual_guest_block_device_template_group_get_public_images.json")).build(); SoftLayerApi api = requestSendsResponse(listPublicImagesRequest, listPublicImagesResponse); @@ -58,5 +60,32 @@ public void testListPublicImagesWhenResponseIs4xx() { assertTrue(Iterables.isEmpty(api.getVirtualGuestBlockDeviceTemplateGroupApi().getPublicImages())); } + public void testGetObjectWhenResponseIs2xx() { + + HttpRequest getObject = HttpRequest.builder().method("GET") + .endpoint("https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest_Block_Device_Template_Group/3001812/getObject?objectMask=children.blockDevices.diskImage.softwareReferences.softwareDescription") + .addHeader("Accept", "application/json") + .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(); + + HttpResponse getObjectResponse = HttpResponse.builder().statusCode(200) + .payload(payloadFromResource("/virtual_guest_block_device_template_group_get.json")).build(); + + SoftLayerApi api = requestSendsResponse(getObject, getObjectResponse); + + assertEquals(api.getVirtualGuestBlockDeviceTemplateGroupApi().getObject("3001812"), + new GetVirtualGuestBlockDeviceTemplateGroupResponseTest().expected()); + } + + public void testGetObjectWhenResponseIs4xx() { + + HttpRequest getObjectRequest = HttpRequest.builder().method("GET") + .endpoint("https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest_Block_Device_Template_Group/3001812/getObject?objectMask=children.blockDevices.diskImage.softwareReferences.softwareDescription") + .addHeader("Accept", "application/json") + .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(); + + HttpResponse getObjectResponse = HttpResponse.builder().statusCode(404).build(); + SoftLayerApi api = requestSendsResponse(getObjectRequest, getObjectResponse); + assertNull(api.getVirtualGuestBlockDeviceTemplateGroupApi().getObject("3001812")); + } } diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiLiveTest.java index 4751cbc17aa..8698a94df56 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestBlockDeviceTemplateGroupApiLiveTest.java @@ -16,22 +16,41 @@ */ package org.jclouds.softlayer.features; +import static com.google.common.collect.Iterables.get; import static org.testng.Assert.assertNotNull; import java.util.Set; import org.jclouds.softlayer.domain.VirtualGuestBlockDeviceTemplateGroup; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import com.beust.jcommander.internal.Sets; + /** - * Tests behavior of {@code VirtualGuestBlockDeviceTemplateGroupApi} + * Tests behavior of {@code VirtualGuestBlockDeviceTemplateGroupApi} which depends on the account */ @Test(groups = "live") public class VirtualGuestBlockDeviceTemplateGroupApiLiveTest extends BaseSoftLayerApiLiveTest { + Set publicImages = Sets.newHashSet(); + @BeforeClass + void init() { + publicImages = api().getPublicImages(); + } + @Test public void testGetBlockDeviceTemplateGroups() { - Set publicImages = api().getPublicImages(); - assertNotNull(publicImages); + for (VirtualGuestBlockDeviceTemplateGroup publicImage : publicImages) { + assertNotNull(publicImage); + } + } + + @Test(dependsOnMethods = "testGetBlockDeviceTemplateGroups") + public void testGetObject() { + if (!publicImages.isEmpty()) { + VirtualGuestBlockDeviceTemplateGroup virtualGuestBlockDeviceTemplateGroup = api().getObject(get(publicImages, 0).getGlobalIdentifier()); + assertNotNull(virtualGuestBlockDeviceTemplateGroup); + } } private VirtualGuestBlockDeviceTemplateGroupApi api() { diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/GetVirtualGuestBlockDeviceTemplateGroupResponseTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/GetVirtualGuestBlockDeviceTemplateGroupResponseTest.java new file mode 100644 index 00000000000..70d202ea855 --- /dev/null +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/GetVirtualGuestBlockDeviceTemplateGroupResponseTest.java @@ -0,0 +1,212 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.softlayer.parse; + +import javax.ws.rs.Consumes; +import javax.ws.rs.core.MediaType; + +import org.jclouds.softlayer.domain.SoftwareDescription; +import org.jclouds.softlayer.domain.VirtualDiskImage; +import org.jclouds.softlayer.domain.VirtualDiskImageSoftware; +import org.jclouds.softlayer.domain.VirtualGuestBlockDeviceTemplate; +import org.jclouds.softlayer.domain.VirtualGuestBlockDeviceTemplateGroup; +import org.jclouds.softlayer.internal.BaseSoftLayerParseTest; +import org.testng.annotations.Test; + +import com.google.common.collect.ImmutableSet; + +@Test(groups = "unit") +public class + GetVirtualGuestBlockDeviceTemplateGroupResponseTest extends + BaseSoftLayerParseTest { + + @Override + public String resource() { + return "/virtual_guest_block_device_template_group_get.json"; + } + + @Override + @Consumes(MediaType.APPLICATION_JSON) + public VirtualGuestBlockDeviceTemplateGroup expected() { + return VirtualGuestBlockDeviceTemplateGroup.builder() + .id(402456) + .name("DST_Windows-2008_R2DC_x86-64_Base_ICOv2") + .globalIdentifier("8df677d9-02a0-43b0-9cc8-88015fcb6ad7") + .statusId(1) + .accountId(278462) + .summary("DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4") + .children(VirtualGuestBlockDeviceTemplateGroup.builder() + .id(402458) + .name("DST_Windows-2008_R2DC_x86-64_Base_ICOv2") + .statusId(1) + .accountId(278462) + .parentId(402456) + .summary("DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4") + .blockDevices(ImmutableSet.of( + VirtualGuestBlockDeviceTemplate.builder() + .id(508130) + .device("0") + .diskSpace(20926382592f) + .diskImageId(6865056) + .groupId(402458) + .units("B") + .diskImage(VirtualDiskImage.builder() + .id(6865056) + .uuid("00c9bb78-9ac0-4f43-b4d8-35a6568c7db8") + .capacity(25f) + .units("GB") + .typeId(241) + .description("rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com") + .name("rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com") + .storageRepositoryId(2330744) + .softwareReferences(ImmutableSet.of( + VirtualDiskImageSoftware.builder() + .id(4259392) + .softwareDescriptionId(727) + .softwareDescription( + SoftwareDescription.builder() + .id(727) + .longDescription("Nimsoft / Nimsoft Robot / 5.0") + .manufacturer("Nimsoft") + .name("Nimsoft Robot") + .operatingSystem(0) + .requiredUser("administrator") + .version("5.0") + .controlPanel(0) + .virtualLicense("0") + .virtualizationPlatform("0") + .build()) + .build(), + VirtualDiskImageSoftware.builder() + .id(4259394) + .softwareDescriptionId(829) + .softwareDescription( + SoftwareDescription.builder() + .id(829) + .longDescription("Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit") + .manufacturer("Microsoft") + .name("Windows 2008 FULL DC 64 bit R2 SP1") + .operatingSystem(1) + .referenceCode("WIN_2008-DC-R2-SP1_64") + .requiredUser("Administrator") + .version("DC 64 bit") + .controlPanel(0) + .virtualLicense("0") + .virtualizationPlatform("0") + .build()) + .build())) + .build()) + .build(), + VirtualGuestBlockDeviceTemplate.builder() + .id(508136) + .device("1") + .diskImageId(6865060) + .groupId(402458) + .diskImage(VirtualDiskImage.builder() + .id(6865060) + .name("7903014-SWAP") + .uuid("38eb1c23-0cf9-4325-b78a-95545829a36d") + .capacity(2f) + .units("GB") + .typeId(246) + .description("7903014-SWAP") + .storageRepositoryId(2330744) + .build()) + .build())) + .build(), + VirtualGuestBlockDeviceTemplateGroup.builder() + .id(402460) + .name("DST_Windows-2008_R2DC_x86-64_Base_ICOv2") + .statusId(1) + .accountId(278462) + .parentId(402456) + .summary("DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4") + .blockDevices( + VirtualGuestBlockDeviceTemplate.builder() + .id(508132) + .device("0") + .diskSpace(20926382592f) + .diskImageId(6865054) + .groupId(402460) + .units("B") + .diskImage(VirtualDiskImage.builder() + .id(6865054) + .capacity(25f) + .description("rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com") + .name("rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com") + .storageRepositoryId(2330746) + .units("GB") + .typeId(241) + .uuid("ef20e61c-6814-47bf-8cd9-9d26f84d3789") + .softwareReferences(ImmutableSet.of( + VirtualDiskImageSoftware.builder() + .id(4259396) + .softwareDescriptionId(727) + .softwareDescription( + SoftwareDescription.builder() + .id(727) + .longDescription("Nimsoft / Nimsoft Robot / 5.0") + .manufacturer("Nimsoft") + .name("Nimsoft Robot") + .operatingSystem(0) + .requiredUser("administrator") + .version("5.0") + .controlPanel(0) + .virtualLicense("0") + .virtualizationPlatform("0") + .build()) + .build(), + VirtualDiskImageSoftware.builder() + .id(4259398) + .softwareDescriptionId(829) + .softwareDescription( + SoftwareDescription.builder() + .id(829) + .longDescription("Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit") + .manufacturer("Microsoft") + .name("Windows 2008 FULL DC 64 bit R2 SP1") + .operatingSystem(1) + .referenceCode("WIN_2008-DC-R2-SP1_64") + .requiredUser("Administrator") + .version("DC 64 bit") + .controlPanel(0) + .virtualLicense("0") + .virtualizationPlatform("0") + .build()) + .build())) + .build()) + .build(), + VirtualGuestBlockDeviceTemplate.builder() + .id(508134) + .device("1") + .diskImageId(6865058) + .groupId(402460) + .diskImage(VirtualDiskImage.builder() + .id(6865058) + .name("7903014-SWAP") + .capacity(2f) + .description("7903014-SWAP") + .storageRepositoryId(2330746) + .typeId(246) + .units("GB") + .uuid("c84edb86-a9ce-4932-bf2c-c3e4b2b44ae9") + .build()) + .build()) + .build()) + .build(); + } +} diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/ListPublicImagesResponseTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/ListPublicImagesResponseTest.java index a0f30cd2410..d91900b7051 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/ListPublicImagesResponseTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/parse/ListPublicImagesResponseTest.java @@ -37,7 +37,7 @@ public class ListPublicImagesResponseTest extends @Override public String resource() { - return "/virtualGuestBlockDeviceTemplateGroup_public_images.json"; + return "/virtual_guest_block_device_template_group_get_public_images.json"; } @Override diff --git a/providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get.json b/providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get.json new file mode 100644 index 00000000000..bc15ed26428 --- /dev/null +++ b/providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get.json @@ -0,0 +1,709 @@ +{ + "accountId": 278462, + "createDate": "2015-01-26T23:36:05+00:00", + "id": 402456, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": null, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "accountReferences": [], + "children": [ + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402458, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865056, + "diskSpace": 20926382592, + "groupId": 402458, + "id": 508130, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865056, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 241, + "units": "GB", + "uuid": "00c9bb78-9ac0-4f43-b4d8-35a6568c7db8", + "softwareReferences": [ + { + "id": 4259392, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259394, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865060, + "groupId": 402458, + "id": 508136, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865060, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 246, + "units": "GB", + "uuid": "38eb1c23-0cf9-4325-b78a-95545829a36d", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": { + "accountId": 278462, + "createDate": "2015-01-26T23:36:05+00:00", + "id": 402456, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": null, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "accountReferences": [], + "children": [ + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402458, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865056, + "diskSpace": 20926382592, + "groupId": 402458, + "id": 508130, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865056, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 241, + "units": "GB", + "uuid": "00c9bb78-9ac0-4f43-b4d8-35a6568c7db8", + "softwareReferences": [ + { + "id": 4259392, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259394, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865060, + "groupId": 402458, + "id": 508136, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865060, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 246, + "units": "GB", + "uuid": "38eb1c23-0cf9-4325-b78a-95545829a36d", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": null + }, + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402460, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865054, + "diskSpace": 20926382592, + "groupId": 402460, + "id": 508132, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865054, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 241, + "units": "GB", + "uuid": "ef20e61c-6814-47bf-8cd9-9d26f84d3789", + "softwareReferences": [ + { + "id": 4259396, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259398, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865058, + "groupId": 402460, + "id": 508134, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865058, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 246, + "units": "GB", + "uuid": "c84edb86-a9ce-4932-bf2c-c3e4b2b44ae9", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": null + } + ], + "globalIdentifier": "8df677d9-02a0-43b0-9cc8-88015fcb6ad7" + } + }, + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402460, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865054, + "diskSpace": 20926382592, + "groupId": 402460, + "id": 508132, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865054, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 241, + "units": "GB", + "uuid": "ef20e61c-6814-47bf-8cd9-9d26f84d3789", + "softwareReferences": [ + { + "id": 4259396, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259398, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865058, + "groupId": 402460, + "id": 508134, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865058, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 246, + "units": "GB", + "uuid": "c84edb86-a9ce-4932-bf2c-c3e4b2b44ae9", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": { + "accountId": 278462, + "createDate": "2015-01-26T23:36:05+00:00", + "id": 402456, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": null, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "accountReferences": [], + "children": [ + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402458, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865056, + "diskSpace": 20926382592, + "groupId": 402458, + "id": 508130, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865056, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 241, + "units": "GB", + "uuid": "00c9bb78-9ac0-4f43-b4d8-35a6568c7db8", + "softwareReferences": [ + { + "id": 4259392, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259394, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865060, + "groupId": 402458, + "id": 508136, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865060, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330744, + "typeId": 246, + "units": "GB", + "uuid": "38eb1c23-0cf9-4325-b78a-95545829a36d", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330744, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": null + }, + { + "accountId": 278462, + "createDate": "2015-01-26T23:36:10+00:00", + "id": 402460, + "name": "DST_Windows-2008_R2DC_x86-64_Base_ICOv2", + "note": "DST Standard Windows image for deploying into VSP in ICO 2.4", + "parentId": 402456, + "publicFlag": 1, + "statusId": 1, + "summary": "DST_Windows-2008_R2DC_x86-64_Base with preparation for ICO 2.4", + "transactionId": null, + "userRecordId": 146842, + "blockDevices": [ + { + "device": "0", + "diskImageId": 6865054, + "diskSpace": 20926382592, + "groupId": 402460, + "id": 508132, + "units": "B", + "diskImage": { + "capacity": 25, + "createDate": "2015-01-26T23:36:10+00:00", + "description": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "id": 6865054, + "modifyDate": null, + "name": "rrm-2k8r2dc-ico.dstdev.sl.edst.ibm.com", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 241, + "units": "GB", + "uuid": "ef20e61c-6814-47bf-8cd9-9d26f84d3789", + "softwareReferences": [ + { + "id": 4259396, + "softwareDescriptionId": 727, + "softwareDescription": { + "controlPanel": 0, + "id": 727, + "longDescription": "Nimsoft / Nimsoft Robot / 5.0", + "manufacturer": "Nimsoft", + "name": "Nimsoft Robot", + "operatingSystem": 0, + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "5.0", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "administrator" + } + }, + { + "id": 4259398, + "softwareDescriptionId": 829, + "softwareDescription": { + "controlPanel": 0, + "id": 829, + "longDescription": "Microsoft / Windows 2008 FULL DC 64 bit R2 SP1 / DC 64 bit", + "manufacturer": "Microsoft", + "name": "Windows 2008 FULL DC 64 bit R2 SP1", + "operatingSystem": 1, + "referenceCode": "WIN_2008-DC-R2-SP1_64", + "upgradeSoftwareDescriptionId": null, + "upgradeSwDescId": null, + "version": "DC 64 bit", + "virtualLicense": 0, + "virtualizationPlatform": 0, + "requiredUser": "Administrator" + } + } + ], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + }, + { + "device": "1", + "diskImageId": 6865058, + "groupId": 402460, + "id": 508134, + "diskImage": { + "capacity": 2, + "createDate": "2015-01-26T23:36:11+00:00", + "description": "7903014-SWAP", + "id": 6865058, + "modifyDate": null, + "name": "7903014-SWAP", + "parentId": null, + "storageRepositoryId": 2330746, + "typeId": 246, + "units": "GB", + "uuid": "c84edb86-a9ce-4932-bf2c-c3e4b2b44ae9", + "softwareReferences": [], + "storageRepository": { + "description": "SL278462 Public", + "id": 2330746, + "name": "SL278462 Public", + "publicFlag": 1, + "typeId": 181 + } + } + } + ], + "parent": null + } + ], + "globalIdentifier": "8df677d9-02a0-43b0-9cc8-88015fcb6ad7" + } + } + ], + "globalIdentifier": "8df677d9-02a0-43b0-9cc8-88015fcb6ad7" +} \ No newline at end of file diff --git a/providers/softlayer/src/test/resources/virtualGuestBlockDeviceTemplateGroup_public_images.json b/providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get_public_images.json similarity index 100% rename from providers/softlayer/src/test/resources/virtualGuestBlockDeviceTemplateGroup_public_images.json rename to providers/softlayer/src/test/resources/virtual_guest_block_device_template_group_get_public_images.json