cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/master to 7767472
Date Mon, 24 Jun 2013 06:03:13 GMT
Updated Branches:
  refs/heads/master f3fa54e73 -> 77674721c


CLOUDSTACK-308. ec2-describe-instances - Instance type should return right service offering
name


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

Branch: refs/heads/master
Commit: 77674721cacba4bdf446c048118f10c474c92f03
Parents: f3fa54e
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Mon Jun 24 11:07:19 2013 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Mon Jun 24 11:29:12 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/bridge/model/CloudStackServiceOfferingVO.java | 9 +++++++--
 .../bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java    | 4 ++--
 awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java | 2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77674721/awsapi/src/com/cloud/bridge/model/CloudStackServiceOfferingVO.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/model/CloudStackServiceOfferingVO.java b/awsapi/src/com/cloud/bridge/model/CloudStackServiceOfferingVO.java
index de2941e..f63301a 100644
--- a/awsapi/src/com/cloud/bridge/model/CloudStackServiceOfferingVO.java
+++ b/awsapi/src/com/cloud/bridge/model/CloudStackServiceOfferingVO.java
@@ -30,7 +30,10 @@ public class CloudStackServiceOfferingVO {
     @Id
     @Column(name="id")
     private String id;
-    
+
+    @Column(name="uuid")
+    private String uuid;
+
     @Column(name="name")
     private String name;
     
@@ -61,7 +64,9 @@ public class CloudStackServiceOfferingVO {
     public void setDomainId(String domainId) {
         this.domainId = domainId;
     }
-    
 
+    public String getUuid() {
+        return uuid;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77674721/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
index 8cca13e..f0d05d3 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
@@ -58,13 +58,13 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
 	@Override
     public CloudStackServiceOfferingVO getSvcOfferingById( String id ){
         SearchBuilder <CloudStackServiceOfferingVO> searchByID = createSearchBuilder();
-        searchByID.and("id", searchByID.entity().getName(), SearchCriteria.Op.EQ);
+        searchByID.and("uuid", searchByID.entity().getUuid(), SearchCriteria.Op.EQ);
         searchByID.done();
         Transaction txn = Transaction.open(Transaction.CLOUD_DB);
         try {
             txn.start();
             SearchCriteria<CloudStackServiceOfferingVO> sc = searchByID.create();
-            sc.setParameters("id", id);
+            sc.setParameters("uuid", id);
             return findOneBy(sc);
         
         }finally {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77674721/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 1859bb8..f24bfed 100644
--- a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
+++ b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
@@ -1772,7 +1772,7 @@ public class EC2Engine extends ManagerBase {
     private String serviceOfferingIdToInstanceType( String serviceOfferingId ) throws Exception
{
         try{
 
-            CloudStackServiceOfferingVO offering =  scvoDao.getSvcOfferingById(serviceOfferingId);
//dao.getSvcOfferingById(serviceOfferingId);
+            CloudStackServiceOfferingVO offering =  scvoDao.getSvcOfferingById(serviceOfferingId);
             if(offering == null){
                 logger.warn( "No instanceType match for serviceOfferingId: [" + serviceOfferingId
+ "]" );
                 return "m1.small";


Mime
View raw message