Skip to content

Commit 5d758fc

Browse files
authored
fix listCapacity sort by usage
1 parent ca6d2dc commit 5d758fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ public int compare(CapacityResponse resp1, CapacityResponse resp2) {
129129
int res = resp1.getZoneName().compareTo(resp2.getZoneName());
130130
if (res != 0) {
131131
return res;
132+
} else if (getSortBy() != null) {
133+
return 0;
132134
} else {
133135
return resp1.getCapacityType().compareTo(resp2.getCapacityType());
134136
}

0 commit comments

Comments
 (0)