Repository: cloudstack Updated Branches: refs/heads/master a601ae445 -> a0f8f56a5
Added findByPodId(Long podId) to HostDao and HostDaoImpl. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0648cb98 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0648cb98 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0648cb98 Branch: refs/heads/master Commit: 0648cb98042eba19eb581c9d7f5b4d0c69ccd4e1 Parents: 1525ac0 Author: Boris Schrijver <bo...@pcextreme.nl> Authored: Wed Sep 16 22:13:10 2015 +0200 Committer: Boris Schrijver <bo...@pcextreme.nl> Committed: Wed Sep 16 22:13:10 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/0648cb98/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 343ec2a..05aa3cf 100644 --- a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java +++ b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java @@ -45,6 +45,8 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S List<VolumeVO> findByInstanceIdDestroyed(long vmId); + List<VolumeVO> findByPod(long podId); + List<VolumeVO> findByAccountAndPod(long accountId, long podId); List<VolumeVO> findByTemplateAndZone(long templateId, long zoneId); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0648cb98/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 85d08b8..56e92cf 100644 --- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java +++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java @@ -190,6 +190,14 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol } @Override + public List<VolumeVO> findByPod(long podId) { + SearchCriteria<VolumeVO> sc = AllFieldsSearch.create(); + sc.setParameters("pod", podId); + + return listBy(sc); + } + + @Override public List<VolumeVO> findByAccountAndPod(long accountId, long podId) { SearchCriteria<VolumeVO> sc = AllFieldsSearch.create(); sc.setParameters("accountId", accountId);