Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1569,4 +1569,12 @@ CREATE VIEW `cloud`.`user_view` AS
left join
`cloud`.`async_job` ON async_job.instance_id = user.id
and async_job.instance_type = 'User'
and async_job.job_status = 0;
and async_job.job_status = 0;

-- Change usage of VM_DISK_IO_WRITE to use right usage_type
UPDATE
`cloud_usage`.`cloud_usage`
SET
usage_type = 22
WHERE
usage_display like '% io write';
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static boolean parse(AccountVO account, Date startDate, Date endDate) {
usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
}
usageRecord =
new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioWrite + " io write", UsageTypes.VM_DISK_BYTES_WRITE,
new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioWrite + " io write", UsageTypes.VM_DISK_IO_WRITE,
new Double(ioWrite), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
usageRecords.add(usageRecord);

Expand Down