From 80c250f2dab1678557071fa9505c644b35feeace Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 26 Jan 2011 18:16:02 -0800 Subject: [PATCH] epc has hypervisor types per zone --- .../org/jclouds/eucalyptus/EucalyptusPropertiesBuilder.java | 5 ++--- .../EucalyptusPartnerCloudComputeServiceContextModule.java | 2 +- ...alyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apis/eucalyptus/src/main/java/org/jclouds/eucalyptus/EucalyptusPropertiesBuilder.java b/apis/eucalyptus/src/main/java/org/jclouds/eucalyptus/EucalyptusPropertiesBuilder.java index f694b44bd3..d8048aa959 100644 --- a/apis/eucalyptus/src/main/java/org/jclouds/eucalyptus/EucalyptusPropertiesBuilder.java +++ b/apis/eucalyptus/src/main/java/org/jclouds/eucalyptus/EucalyptusPropertiesBuilder.java @@ -23,6 +23,7 @@ import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.compute.reference.ComputeServiceConstants.PROPERTY_TIMEOUT_PORT_OPEN; import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import java.util.Properties; @@ -39,9 +40,7 @@ public class EucalyptusPropertiesBuilder extends EC2PropertiesBuilder { Properties properties = super.defaultProperties(); properties.setProperty(PROPERTY_ENDPOINT, "http://173.205.188.130:8773/services/Eucalyptus"); - // TODO - // properties.setProperty(PROPERTY_ELB_ENDPOINT, - // "https://elasticloadbalancing.us-east-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGIONS, "Eucalyptus"); properties.setProperty(PROPERTY_EC2_AMI_OWNERS, "admin"); // amis that work with the cluster instances properties.setProperty(PROPERTY_EC2_CC_AMIs, ""); diff --git a/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/config/EucalyptusPartnerCloudComputeServiceContextModule.java b/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/config/EucalyptusPartnerCloudComputeServiceContextModule.java index dc3ab25139..b98308ac77 100644 --- a/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/config/EucalyptusPartnerCloudComputeServiceContextModule.java +++ b/providers/eucalyptus-partnercloud-ec2/src/main/java/org/jclouds/epc/config/EucalyptusPartnerCloudComputeServiceContextModule.java @@ -36,7 +36,7 @@ public class EucalyptusPartnerCloudComputeServiceContextModule extends EC2Comput @Override protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { - return template.osFamily(CENTOS); + return template.osFamily(CENTOS).locationId("xen-cluster").osDescriptionMatches("xen"); } @Override diff --git a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java index 657812490f..23bce83fd2 100644 --- a/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java +++ b/providers/eucalyptus-partnercloud-ec2/src/test/java/org/jclouds/epc/compute/EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest.java @@ -68,7 +68,7 @@ public class EucalyptusPartnerCloudEucalyptusTemplateBuilderLiveTest extends Bas assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.CENTOS); assertEquals(defaultTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store"); - assertEquals(defaultTemplate.getLocation().getId(), "Eucalyptus"); + assertEquals(defaultTemplate.getLocation().getId(), "xen-cluster"); assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); }