Saving Energy Strategy

Add strategy to trigger "power on" and "power off" actions in watcher.

Change-Id: I7ebcd2a0282e3cc7b9b01cf8c744468ce16c56bb
Implements: blueprint strategy-to-trigger-power-on-and-power-off-actions
Co-Authored-By: licanwei <li.canwei2@zte.com.cn>
This commit is contained in:
Yumeng Bao
2017-06-23 11:35:37 +08:00
parent fe7ad9e42b
commit 5a28ac772a
7 changed files with 449 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ ThermalOptimization = goals.ThermalOptimization
Unclassified = goals.Unclassified
WorkloadBalancing = goals.WorkloadBalancing
NoisyNeighbor = goals.NoisyNeighborOptimization
SavingEnergy = goals.SavingEnergy
__all__ = ("Dummy", "ServerConsolidation", "ThermalOptimization",
"Unclassified", "WorkloadBalancing",
"NoisyNeighborOptimization",)
"NoisyNeighborOptimization", "SavingEnergy")

View File

@@ -192,3 +192,27 @@ class NoisyNeighborOptimization(base.Goal):
def get_efficacy_specification(cls):
"""The efficacy spec for the current goal"""
return specs.Unclassified()
class SavingEnergy(base.Goal):
"""SavingEnergy
This goal is used to reduce power consumption within a data center.
"""
@classmethod
def get_name(cls):
return "saving_energy"
@classmethod
def get_display_name(cls):
return _("Saving Energy")
@classmethod
def get_translatable_display_name(cls):
return "Saving Energy"
@classmethod
def get_efficacy_specification(cls):
"""The efficacy spec for the current goal"""
return specs.Unclassified()