Skip to content

Commit cf0649d

Browse files
Anurag Awasthiyadvr
authored andcommitted
server: Add size to listUsageRecords response for VMSnapShotOnPrimary (type 27) (#3529)
Add size to list usage records for VMSnapShotOnPrimary (type 27). The size was included in description but missing from response.
1 parent 1141377 commit cf0649d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

server/src/main/java/com/cloud/api/ApiResponseHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3684,6 +3684,7 @@ public UsageRecordResponse createUsageResponse(Usage usageRecord, Map<String, Se
36843684
usageRecResponse.setDescription(builder.toString());
36853685
}
36863686
} else if (usageRecord.getUsageType() == UsageTypes.VM_SNAPSHOT_ON_PRIMARY) {
3687+
usageRecResponse.setSize(usageRecord.getVirtualSize());
36873688
if (!oldFormat) {
36883689
final StringBuilder builder = new StringBuilder();
36893690
builder.append("VMSnapshot on primary storage usage");

0 commit comments

Comments
 (0)