From afda717d2f1baa4bdf43e74afc7b2a13da78d55e Mon Sep 17 00:00:00 2001 From: Jason King Date: Tue, 27 Sep 2011 13:13:22 +0100 Subject: [PATCH] Issue 158: Removed SoftLayerConstants.CLOUD_SERVER_PACKAGE_NAME as it is passed in via a property --- .../jclouds/softlayer/reference/SoftLayerConstants.java | 5 ----- .../softlayer/features/ProductPackageClientLiveTest.java | 9 ++++++++- .../softlayer/features/VirtualGuestClientLiveTest.java | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sandbox-providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java b/sandbox-providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java index e41c5bc82c..a90115643a 100644 --- a/sandbox-providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java +++ b/sandbox-providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java @@ -34,11 +34,6 @@ public interface SoftLayerConstants { */ public static final String PROPERTY_SOFTLAYER_VIRTUALGUEST_PACKAGE_NAME = "jclouds.softlayer.virtualguest.package-name"; - /** - * Name of the package used for ordering virtual guests. - */ - public static final String CLOUD_SERVER_PACKAGE_NAME = "Cloud Server"; - public static final Set DEFAULT_VIRTUAL_GUEST_PRICES = ImmutableSet.builder() .add(ProductItemPrice.builder().id(1639).build()) // 100 GB (SAN) .add(ProductItemPrice.builder().id(21).build()) // 1 IP Address diff --git a/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/ProductPackageClientLiveTest.java b/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/ProductPackageClientLiveTest.java index 32e93ca5c5..402c68aeee 100644 --- a/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/ProductPackageClientLiveTest.java +++ b/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/ProductPackageClientLiveTest.java @@ -32,7 +32,6 @@ import java.util.Set; import static org.jclouds.softlayer.predicates.ProductItemPredicates.*; import static org.jclouds.softlayer.predicates.ProductPackagePredicates.named; -import static org.jclouds.softlayer.reference.SoftLayerConstants.CLOUD_SERVER_PACKAGE_NAME; import static org.testng.Assert.*; /** @@ -42,6 +41,14 @@ import static org.testng.Assert.*; */ @Test(groups = "live") public class ProductPackageClientLiveTest extends BaseSoftLayerClientLiveTest { + + /** + * Name of the package used for ordering virtual guests. + * For real this is passed in using the property + * @{code org.jclouds.softlayer.reference.SoftLayerConstants.PROPERTY_SOFTLAYER_VIRTUALGUEST_PACKAGE_NAME} + */ + public static final String CLOUD_SERVER_PACKAGE_NAME = "Cloud Server"; + @BeforeGroups(groups = { "live" }) public void setupClient() { super.setupClient(); diff --git a/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java b/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java index 74dd2a1ab8..d8f3444567 100644 --- a/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java +++ b/sandbox-providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestClientLiveTest.java @@ -34,7 +34,6 @@ import java.util.Set; import static org.jclouds.softlayer.predicates.ProductItemPredicates.*; import static org.jclouds.softlayer.predicates.ProductPackagePredicates.named; -import static org.jclouds.softlayer.reference.SoftLayerConstants.CLOUD_SERVER_PACKAGE_NAME; import static org.testng.Assert.*; /** @@ -81,7 +80,7 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest { } } - int pkgId = Iterables.find(context.getApi().getAccountClient().getActivePackages(),named(CLOUD_SERVER_PACKAGE_NAME)).getId(); + int pkgId = Iterables.find(context.getApi().getAccountClient().getActivePackages(),named(ProductPackageClientLiveTest.CLOUD_SERVER_PACKAGE_NAME)).getId(); ProductPackage productPackage = context.getApi().getProductPackageClient().getProductPackage(pkgId); Iterable ramItems = Iterables.filter(productPackage.getItems(),