cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 941c12d
Date Sat, 10 Aug 2013 19:30:59 GMT
CLOUDSTACK-4234 Dedicated Resources: When multiple dedication groups are chosen for VM deployment,
dedicated resources belonging to both groups should be considered

- Override the equals method


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

Branch: refs/heads/4.2
Commit: 941c12dcd79c7044f75c2d496975e6503f076d9c
Parents: 61bd96c
Author: Prachi Damle <prachi@cloud.com>
Authored: Sat Aug 10 12:13:22 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Sat Aug 10 12:14:12 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/dc/DedicatedResourceVO.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/941c12dc/server/src/com/cloud/dc/DedicatedResourceVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DedicatedResourceVO.java b/server/src/com/cloud/dc/DedicatedResourceVO.java
index f1ec6a1..9caa6b0 100644
--- a/server/src/com/cloud/dc/DedicatedResourceVO.java
+++ b/server/src/com/cloud/dc/DedicatedResourceVO.java
@@ -26,6 +26,7 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
+
 @Entity
 @Table(name="dedicated_resources")
 public class DedicatedResourceVO implements DedicatedResources{
@@ -142,4 +143,13 @@ public class DedicatedResourceVO implements DedicatedResources{
     public long getAffinityGroupId() {
         return affinityGroupId;
     }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof DedicatedResourceVO) {
+            return ((DedicatedResourceVO) obj).getId() == this.getId();
+        } else {
+            return false;
+        }
+    }
 }


Mime
View raw message