mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6884: List Capacity API always returns GPU capacity also even if type is different.
This commit is contained in:
parent
71f76edf71
commit
28505c2729
@ -1472,7 +1472,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
}
|
||||
|
||||
List<VgpuTypesInfo> gpuCapacities;
|
||||
if (!result.isEmpty() && (gpuCapacities = ApiDBUtils.getGpuCapacites(result.get(0).getDataCenterId(), result.get(0).getPodId(), result.get(0).getClusterId())) != null) {
|
||||
if (result.size() > 1 && (gpuCapacities = ApiDBUtils.getGpuCapacites(result.get(0).getDataCenterId(), result.get(0).getPodId(), result.get(0).getClusterId())) != null) {
|
||||
HashMap<String, Long> vgpuVMs = ApiDBUtils.getVgpuVmsCount(result.get(0).getDataCenterId(), result.get(0).getPodId(), result.get(0).getClusterId());
|
||||
|
||||
float capacityUsed = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user