correction du bug 240 : maintenant que les machines peuvent être ajoutées à la volée, les machines ne sont pas nécéssairement prêtes tout de suite

This commit is contained in:
Guillaume Raffy 2012-07-03 14:38:29 +00:00
parent 08f168809e
commit 47b86312a6
1 changed files with 6 additions and 3 deletions

View File

@ -147,19 +147,22 @@ class ClusterStatus:
"""
fEnergySavings = 0.0
for machine in self.m_clusterNodes.itervalues():
fEnergySavings += machine.getEnergySavings()
if machine.isReady():
fEnergySavings += machine.getEnergySavings()
return fEnergySavings
def getCurrentPowerConsumption( self ):
fPowerConsumption = 0.0
for machine in self.m_clusterNodes.itervalues():
fPowerConsumption += machine.getPowerConsumption()
if machine.isReady():
fPowerConsumption += machine.getPowerConsumption()
return fPowerConsumption
def getCurrentPowerSavings( self ):
fPowerSavings = 0.0
for machine in self.m_clusterNodes.itervalues():
fPowerSavings += machine.getPowerConsumptionForPowerState( PowerState.ON ) - machine.getPowerConsumption()
if machine.isReady():
fPowerSavings += machine.getPowerConsumptionForPowerState( PowerState.ON ) - machine.getPowerConsumption()
return fPowerSavings
def getNumControlledSlots( self ):