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:
parent
08f168809e
commit
47b86312a6
|
@ -147,18 +147,21 @@ class ClusterStatus:
|
|||
"""
|
||||
fEnergySavings = 0.0
|
||||
for machine in self.m_clusterNodes.itervalues():
|
||||
if machine.isReady():
|
||||
fEnergySavings += machine.getEnergySavings()
|
||||
return fEnergySavings
|
||||
|
||||
def getCurrentPowerConsumption( self ):
|
||||
fPowerConsumption = 0.0
|
||||
for machine in self.m_clusterNodes.itervalues():
|
||||
if machine.isReady():
|
||||
fPowerConsumption += machine.getPowerConsumption()
|
||||
return fPowerConsumption
|
||||
|
||||
def getCurrentPowerSavings( self ):
|
||||
fPowerSavings = 0.0
|
||||
for machine in self.m_clusterNodes.itervalues():
|
||||
if machine.isReady():
|
||||
fPowerSavings += machine.getPowerConsumptionForPowerState( PowerState.ON ) - machine.getPowerConsumption()
|
||||
return fPowerSavings
|
||||
|
||||
|
|
Loading…
Reference in New Issue