On 04/06/10 17:57 +0100, [email protected] wrote:
>From: martyntaylor <[email protected]>
>
>---
> src/app/controllers/quota_controller.rb |    6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/src/app/controllers/quota_controller.rb 
>b/src/app/controllers/quota_controller.rb
>index 6a42d00..83e538e 100644
>--- a/src/app/controllers/quota_controller.rb
>+++ b/src/app/controllers/quota_controller.rb
>@@ -51,13 +51,13 @@ class QuotaController < ApplicationController
>         hwp = HardwareProfile.find(instance.hardware_profile_id)
>         if instance.state == Instance::STATE_RUNNING
>           @quota.running_instances += 1
>-          @quota.running_memory += hwp.memory
>-          #TODO Add CPUs
>+          @quota.running_memory = @quota.running_memory.to_f + 
>hwp.memory.value.to_f
>+          @quota.running_cpus = @quota.running_cpus.to_f + hwp.cpu.value.to_f
>         end
>
>         if InstanceObserver::ACTIVE_STATES.include?(instance.state)
>           @quota.total_instances += 1
>-          @quota.total_storage += hwp.storage
>+          @quota.total_storage = @quota.total_storage.to_f + 
>hwp.storage.value.to_f
>         end
>       end
>
>--
>1.6.6.1

ACK.

Looks good for me, applied cleanely. After I create a new quota I can see CPU's 
and memory.

-- Michal


-- 
--------------------------------------------------------
Michal Fojtik, [email protected], +420 532 294 4307
Ruby / Ruby On Rails Developer
Deltacloud API: http://deltacloud.org
--------------------------------------------------------
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to