cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/master to 4858bd1
Date Thu, 27 Jun 2013 23:58:18 GMT
Updated Branches:
  refs/heads/master f88590f6d -> 4858bd1df


CLOUDSTACK-3251 AWSAPI - runInstances should not error out if instanceType provided is a valid
ServiceOffering on CloudStack

Changes: - If instanceType value corresponds to a valid serviceoffering on CloudStack, dont
error out on runInstances even if thats not an AWS name


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4858bd1d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4858bd1d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4858bd1d

Branch: refs/heads/master
Commit: 4858bd1df37d97732fbd3f13f8ae252582145577
Parents: f88590f
Author: Prachi Damle <prachi@cloud.com>
Authored: Thu Jun 27 15:59:26 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Thu Jun 27 15:59:26 2013 -0700

----------------------------------------------------------------------
 awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4858bd1d/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
index 163d9f8..15ed908 100644
--- a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
+++ b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
@@ -1744,16 +1744,8 @@ public class EC2Engine extends ManagerBase {
 
     private CloudStackServiceOfferingVO getCSServiceOfferingId(String instanceType) throws
Exception {
         try {
-            // list of valid values for AWS EC2 instanceType
-            String[] validInstanceTypes = {"t1.micro", "m1.small", "m1.medium", "m1.large",
"m1.xlarge",
-                    "c1.medium", "c1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge",
-                    "m3.xlarge", "m3.2xlarge", "hi1.4xlarge", "cc1.4xlarge", "cg1.4xlarge",
"cc2.8xlarge"};
-
             if (instanceType == null)
                 instanceType = "m1.small"; // default value
-            else if ( !Arrays.asList(validInstanceTypes).contains(instanceType)) { 
-                throw new Exception("Specified instance type is invalid");
-            }
             return scvoDao.getSvcOfferingByName(instanceType);
         } catch(Exception e) {
             logger.error( "Error while retrieving ServiceOffering information by name - ",
e);


Mime
View raw message