cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [06/14] git commit: updated refs/heads/master to f31c318
Date Wed, 04 Sep 2013 03:20:05 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/2ce25521
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ce25521
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ce25521

Branch: refs/heads/master
Commit: 2ce25521324e03b2252cd128015580323a93ac80
Parents: 5628153
Author: Prachi Damle <prachi@cloud.com>
Authored: Sat Aug 10 12:13:22 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Tue Sep 3 20:02:47 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/2ce25521/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