1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

DATABLOCK support for quotas

This commit is contained in:
Daniel Molina 2011-11-23 11:41:29 +01:00
parent 86dd81fda4
commit 2bce90b59b

View File

@ -78,7 +78,13 @@ class Quota
IMAGE_USAGE = {
:STORAGE => {
:proc_info => lambda {|template| File.size(template['PATH']) },
:proc_info => lambda {|template|
if template['TYPE'] == 'DATABLOCK'
template['SIZE'].to_i
else
File.size(template['PATH'])
end
},
:xpath => 'SIZE'
}
}