You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2811252
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -100,6 +99,9 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
100
99
101
100
privatestaticfinalStringORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT_PART1 = "SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ? ";
102
101
privatestaticfinalStringORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT_PART2 = " GROUP BY pool.id ORDER BY 2 ASC ";
102
+
privatestaticfinalStringLIST_USER_VOLUME_IDS = "SELECT vol.id FROM `cloud`.`volumes` vol "
103
+
+ "LEFT JOIN `cloud`.`vm_instance` vm ON vm.id = vol.instance_id "
104
+
+ "WHERE vol.removed IS NULL AND (vol.instance_id IS NULL OR vm.type = 'User')";
103
105
104
106
privatestaticfinalStringORDER_ZONE_WIDE_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT = "SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ? "
105
107
+ " AND pool.scope = 'ZONE' AND pool.status='Up' " + " GROUP BY pool.id ORDER BY 2 ASC ";
@@ -120,18 +122,44 @@ public List<VolumeVO> findByAccount(long accountId) {
Copy file name to clipboardExpand all lines: plugins/resource-alerts/src/test/java/org/apache/cloudstack/resourcealert/ResourceAlertManagerImplTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -875,7 +875,7 @@ public void testGenericVolumeRuleForRootAdminListsReadyVolumesCloudWide() {
0 commit comments