mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch '4.19' into 4.20
This commit is contained in:
commit
7e0414354a
@ -132,14 +132,16 @@ public class ListCapacityCmd extends BaseListCmd {
|
||||
Collections.sort(capacityResponses, new Comparator<CapacityResponse>() {
|
||||
public int compare(CapacityResponse resp1, CapacityResponse resp2) {
|
||||
int res = resp1.getZoneName().compareTo(resp2.getZoneName());
|
||||
// Group by zone
|
||||
if (res != 0) {
|
||||
return res;
|
||||
} else {
|
||||
return resp1.getCapacityType().compareTo(resp2.getCapacityType());
|
||||
}
|
||||
// Sort by capacity type only if not already sorted by usage
|
||||
return (getSortBy() != null) ? 0 : resp1.getCapacityType().compareTo(resp2.getCapacityType());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
response.setResponses(capacityResponses);
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user