From 85a54e82bcd077f326367848e4a3b2ecc8f89fc9 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Tue, 27 Sep 2011 12:52:28 -0700 Subject: [PATCH] Issue 645: go2cloud now passes all but one test --- ...annesburg1ComputeServiceContextModule.java | 4 ++-- .../go2cloud-jhb1/preinstalled_images.json | 20 ++++++++++++++++--- .../Go2CloudJohannesburg1ClientLiveTest.java | 4 ++-- ...dJohannesburg1TemplateBuilderLiveTest.java | 6 ++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/sandbox-providers/go2cloud-jhb1/src/main/java/org/jclouds/go2cloud/config/Go2CloudJohannesburg1ComputeServiceContextModule.java b/sandbox-providers/go2cloud-jhb1/src/main/java/org/jclouds/go2cloud/config/Go2CloudJohannesburg1ComputeServiceContextModule.java index 792d669e59..c13dc45cbb 100644 --- a/sandbox-providers/go2cloud-jhb1/src/main/java/org/jclouds/go2cloud/config/Go2CloudJohannesburg1ComputeServiceContextModule.java +++ b/sandbox-providers/go2cloud-jhb1/src/main/java/org/jclouds/go2cloud/config/Go2CloudJohannesburg1ComputeServiceContextModule.java @@ -18,7 +18,7 @@ */ package org.jclouds.go2cloud.config; -import static org.jclouds.compute.domain.OsFamily.DEBIAN; +import static org.jclouds.compute.domain.OsFamily.UBUNTU; import org.jclouds.compute.domain.TemplateBuilder; import org.jclouds.elasticstack.compute.config.ElasticStackComputeServiceContextModule; @@ -33,6 +33,6 @@ public class Go2CloudJohannesburg1ComputeServiceContextModule extends ElasticSta @Override protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { - return template.osFamily(DEBIAN).osVersionMatches("6.0").os64Bit(true); + return template.osFamily(UBUNTU).osVersionMatches("10.10").os64Bit(true); } } diff --git a/sandbox-providers/go2cloud-jhb1/src/main/resources/go2cloud-jhb1/preinstalled_images.json b/sandbox-providers/go2cloud-jhb1/src/main/resources/go2cloud-jhb1/preinstalled_images.json index cc87604c50..564c0ba91b 100644 --- a/sandbox-providers/go2cloud-jhb1/src/main/resources/go2cloud-jhb1/preinstalled_images.json +++ b/sandbox-providers/go2cloud-jhb1/src/main/resources/go2cloud-jhb1/preinstalled_images.json @@ -1,4 +1,11 @@ [ + { + "uuid": "14c88d27-1f5e-4ad5-9f3a-28e5d2282f61", + "description": "Ubuntu 10.10", + "osFamily": "UBUNTU", + "osVersion": "10.10", + "size": "1" + }, { "uuid": "cc54132d-4912-4106-a91a-7a27e6866c8b", "description": "Debian 6.0.2.1", @@ -7,10 +14,17 @@ "size": "1" }, { - "uuid": "46e305b6-6a49-409c-bd12-eb966cdb3664", - "description": "Windows 2008 R2 with SP1 (x64)", + "uuid": "77ad0ffe-9537-4c64-a8e3-10db185261c0", + "description": "Windows 2008 R2 (x64) with SP1", "osFamily": "WINDOWS", "osVersion": "2008 R2", "size": "13" + }, + { + "uuid": "d971ddfb-7a69-48f7-8d14-a76ef61b01d8", + "description": "Windows 8 Developer Preview (x64)", + "osFamily": "WINDOWS", + "osVersion": "8", + "size": "13" } -] +] \ No newline at end of file diff --git a/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/Go2CloudJohannesburg1ClientLiveTest.java b/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/Go2CloudJohannesburg1ClientLiveTest.java index c658ee10b9..9d6d9c525a 100644 --- a/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/Go2CloudJohannesburg1ClientLiveTest.java +++ b/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/Go2CloudJohannesburg1ClientLiveTest.java @@ -25,10 +25,10 @@ import org.testng.annotations.Test; * * @author Adrian Cole */ -@Test(groups = "live", sequential = true) +@Test(groups = "live", singleThreaded = true) public class Go2CloudJohannesburg1ClientLiveTest extends ElasticStackClientLiveTest { public Go2CloudJohannesburg1ClientLiveTest() { provider = "go2cloud-jhb1"; - bootDrive = "5192adbd-046f-4a48-90f9-3db390b1efab"; + bootDrive = "14c88d27-1f5e-4ad5-9f3a-28e5d2282f61"; } } diff --git a/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java b/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java index a66c219954..e2efc785e7 100644 --- a/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java +++ b/sandbox-providers/go2cloud-jhb1/src/test/java/org/jclouds/go2cloud/compute/Go2CloudJohannesburg1TemplateBuilderLiveTest.java @@ -52,6 +52,8 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu @Override public boolean apply(OsFamilyVersion64Bit input) { switch (input.family) { + case UBUNTU: + return (input.version.equals("") || input.version.equals("10.10")) && input.is64Bit; case DEBIAN: return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit; case WINDOWS: @@ -68,8 +70,8 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu public void testDefaultTemplateBuilder() throws IOException { Template defaultTemplate = this.context.getComputeService().templateBuilder().build(); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); - assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "6.0"); - assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.DEBIAN); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.10"); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(defaultTemplate.getLocation().getId(), "go2cloud-jhb1"); assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); }