You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/04/18 04:26:24 UTC

[36/41] git commit: updated refs/heads/marvin_refactor to 94b18c6

set Objectname to CreateAffinityGroupResponse Object. Also the listAffinityGroups is missing the 'type' property


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

Branch: refs/heads/marvin_refactor
Commit: 6dccf63a3229eb48be5c2ff941a1550b7741764d
Parents: 7182a93
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 17 17:46:06 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Apr 17 18:04:13 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java    |    7 ++++++-
 .../api/query/dao/AffinityGroupJoinDaoImpl.java    |    1 +
 .../cloud/api/query/vo/AffinityGroupJoinVO.java    |   11 +++++++++++
 setup/db/db/schema-410to420.sql                    |    1 +
 4 files changed, 19 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 50d8de2..819c88b 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3664,8 +3664,13 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setName(group.getName());
         response.setType(group.getType());
         response.setDescription(group.getDescription());
-        // response.setDomainId(account.)
+        Domain domain = ApiDBUtils.findDomainById(account.getDomainId());
+        if (domain != null) {
+            response.setDomainId(domain.getUuid());
+            response.setDomainName(domain.getName());
+        }
 
+        response.setObjectName("affinitygroup");
         return response;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
index a176793..8743bcb 100644
--- a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
@@ -63,6 +63,7 @@ public class AffinityGroupJoinDaoImpl extends GenericDaoBase<AffinityGroupJoinVO
         agResponse.setId(vag.getUuid());
         agResponse.setName(vag.getName());
         agResponse.setDescription(vag.getDescription());
+        agResponse.setType(vag.getType());
 
         ApiResponseHelper.populateOwner(agResponse, vag);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
index e68996c..1c0dc2c 100644
--- a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
@@ -36,6 +36,9 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
     @Column(name="name")
     private String name;
 
+    @Column(name = "type")
+    private String type;
+
     @Column(name = "description")
     private String description;
 
@@ -114,6 +117,14 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
         this.name = name;
     }
 
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
     @Override
     public long getAccountId() {
         return accountId;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index a36be0e..ce651a0 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -512,6 +512,7 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
     select 
         affinity_group.id id,
         affinity_group.name name,
+        affinity_group.type type,
         affinity_group.description description,
         affinity_group.uuid uuid,
         account.id account_id,