mirror of https://github.com/apache/jclouds.git
Issue 158: Removed SoftLayerConstants.CLOUD_SERVER_PACKAGE_NAME as it is passed in via a property
This commit is contained in:
parent
753bf9f066
commit
afda717d2f
|
@ -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<ProductItemPrice> DEFAULT_VIRTUAL_GUEST_PRICES = ImmutableSet.<ProductItemPrice>builder()
|
||||
.add(ProductItemPrice.builder().id(1639).build()) // 100 GB (SAN)
|
||||
.add(ProductItemPrice.builder().id(21).build()) // 1 IP Address
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<ProductItem> ramItems = Iterables.filter(productPackage.getItems(),
|
||||
|
|
Loading…
Reference in New Issue