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.
This commit is contained in:
Anurag Awasthi 2019-07-31 12:39:10 +05:30 committed by Rohit Yadav
parent 1141377e50
commit cf0649def1

View File

@ -3684,6 +3684,7 @@ public class ApiResponseHelper implements ResponseGenerator {
usageRecResponse.setDescription(builder.toString());
}
} else if (usageRecord.getUsageType() == UsageTypes.VM_SNAPSHOT_ON_PRIMARY) {
usageRecResponse.setSize(usageRecord.getVirtualSize());
if (!oldFormat) {
final StringBuilder builder = new StringBuilder();
builder.append("VMSnapshot on primary storage usage");