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
|
fEnergySavings = 0.0
|
||||||
for machine in self.m_clusterNodes.itervalues():
|
for machine in self.m_clusterNodes.itervalues():
|
||||||
|
if machine.isReady():
|
||||||
fEnergySavings += machine.getEnergySavings()
|
fEnergySavings += machine.getEnergySavings()
|
||||||
return fEnergySavings
|
return fEnergySavings
|
||||||
|
|
||||||
def getCurrentPowerConsumption( self ):
|
def getCurrentPowerConsumption( self ):
|
||||||
fPowerConsumption = 0.0
|
fPowerConsumption = 0.0
|
||||||
for machine in self.m_clusterNodes.itervalues():
|
for machine in self.m_clusterNodes.itervalues():
|
||||||
|
if machine.isReady():
|
||||||
fPowerConsumption += machine.getPowerConsumption()
|
fPowerConsumption += machine.getPowerConsumption()
|
||||||
return fPowerConsumption
|
return fPowerConsumption
|
||||||
|
|
||||||
def getCurrentPowerSavings( self ):
|
def getCurrentPowerSavings( self ):
|
||||||
fPowerSavings = 0.0
|
fPowerSavings = 0.0
|
||||||
for machine in self.m_clusterNodes.itervalues():
|
for machine in self.m_clusterNodes.itervalues():
|
||||||
|
if machine.isReady():
|
||||||
fPowerSavings += machine.getPowerConsumptionForPowerState( PowerState.ON ) - machine.getPowerConsumption()
|
fPowerSavings += machine.getPowerConsumptionForPowerState( PowerState.ON ) - machine.getPowerConsumption()
|
||||||
return fPowerSavings
|
return fPowerSavings
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue