From 2bce90b59b98a518897069a3c6b73f9c241a5b1d Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 23 Nov 2011 11:41:29 +0100 Subject: [PATCH] DATABLOCK support for quotas --- src/authm_mad/remotes/quota/quota.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/quota/quota.rb b/src/authm_mad/remotes/quota/quota.rb index 4231c105ce..046bdc9493 100644 --- a/src/authm_mad/remotes/quota/quota.rb +++ b/src/authm_mad/remotes/quota/quota.rb @@ -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' } }