cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [5/9] git commit: updated refs/heads/master to a0f8f56
Date Wed, 23 Sep 2015 12:00:15 GMT
Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl.


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

Branch: refs/heads/master
Commit: 0df3357cac73a2191cf4e01d5ef8db48a0bcbc64
Parents: 12fc2b4
Author: Boris Schrijver <boris@pcextreme.nl>
Authored: Wed Sep 16 22:17:27 2015 +0200
Committer: Boris Schrijver <boris@pcextreme.nl>
Committed: Wed Sep 16 22:17:27 2015 +0200

----------------------------------------------------------------------
 engine/schema/src/com/cloud/storage/dao/VolumeDao.java     | 2 ++
 engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java | 8 ++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0df3357c/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
index 05aa3cf..4959ce4 100644
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
@@ -47,6 +47,8 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S
 
     List<VolumeVO> findByPod(long podId);
 
+    List<VolumeVO> findByDc(long dcId);
+
     List<VolumeVO> findByAccountAndPod(long accountId, long podId);
 
     List<VolumeVO> findByTemplateAndZone(long templateId, long zoneId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0df3357c/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 56e92cf..7d0c9c3 100644
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -198,6 +198,14 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long>
implements Vol
     }
 
     @Override
+    public List<VolumeVO> findByDc(long dcId) {
+        SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
+        sc.setParameters("data_center_id", dcId);
+
+        return listBy(sc);
+    }
+
+    @Override
     public List<VolumeVO> findByAccountAndPod(long accountId, long podId) {
         SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
         sc.setParameters("accountId", accountId);


Mime
View raw message