Rename (pre/post)condition to (pre/post)_condition
This patch updates the applier's abstract methods to be consistent with other abstract methods of similar nature. Also included are a few other miscellaneous changes. Change-Id: Ia1527c00332011412aba2ab326ec986f1e773001 Closes-bug: 1606634
This commit is contained in:
@@ -72,7 +72,7 @@ class Unclassified(base.Goal):
|
||||
|
||||
|
||||
class ServerConsolidation(base.Goal):
|
||||
"""Server Consolidation
|
||||
"""ServerConsolidation
|
||||
|
||||
This goal is for efficient usage of compute server resources in order to
|
||||
reduce the total number of servers.
|
||||
@@ -84,11 +84,11 @@ class ServerConsolidation(base.Goal):
|
||||
|
||||
@classmethod
|
||||
def get_display_name(cls):
|
||||
return _("Server consolidation")
|
||||
return _("Server Consolidation")
|
||||
|
||||
@classmethod
|
||||
def get_translatable_display_name(cls):
|
||||
return "Server consolidation"
|
||||
return "Server Consolidation"
|
||||
|
||||
@classmethod
|
||||
def get_efficacy_specification(cls):
|
||||
@@ -97,7 +97,7 @@ class ServerConsolidation(base.Goal):
|
||||
|
||||
|
||||
class ThermalOptimization(base.Goal):
|
||||
"""Thermal Optimization
|
||||
"""ThermalOptimization
|
||||
|
||||
This goal is used to balance the temperature across different servers.
|
||||
"""
|
||||
@@ -108,11 +108,11 @@ class ThermalOptimization(base.Goal):
|
||||
|
||||
@classmethod
|
||||
def get_display_name(cls):
|
||||
return _("Thermal optimization")
|
||||
return _("Thermal Optimization")
|
||||
|
||||
@classmethod
|
||||
def get_translatable_display_name(cls):
|
||||
return "Thermal optimization"
|
||||
return "Thermal Optimization"
|
||||
|
||||
@classmethod
|
||||
def get_efficacy_specification(cls):
|
||||
@@ -121,7 +121,7 @@ class ThermalOptimization(base.Goal):
|
||||
|
||||
|
||||
class WorkloadBalancing(base.Goal):
|
||||
"""Workload Balancing
|
||||
"""WorkloadBalancing
|
||||
|
||||
This goal is used to evenly distribute workloads across different servers.
|
||||
"""
|
||||
@@ -132,11 +132,11 @@ class WorkloadBalancing(base.Goal):
|
||||
|
||||
@classmethod
|
||||
def get_display_name(cls):
|
||||
return _("Workload balancing")
|
||||
return _("Workload Balancing")
|
||||
|
||||
@classmethod
|
||||
def get_translatable_display_name(cls):
|
||||
return "Workload balancing"
|
||||
return "Workload Balancing"
|
||||
|
||||
@classmethod
|
||||
def get_efficacy_specification(cls):
|
||||
@@ -145,9 +145,9 @@ class WorkloadBalancing(base.Goal):
|
||||
|
||||
|
||||
class AirflowOptimization(base.Goal):
|
||||
"""Workload Balancing
|
||||
"""AirflowOptimization
|
||||
|
||||
This goal is used to optimize the air flow within a cloud infrastructure.
|
||||
This goal is used to optimize the airflow within a cloud infrastructure.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@@ -156,11 +156,11 @@ class AirflowOptimization(base.Goal):
|
||||
|
||||
@classmethod
|
||||
def get_display_name(cls):
|
||||
return _("Airflow optimization")
|
||||
return _("Airflow Optimization")
|
||||
|
||||
@classmethod
|
||||
def get_translatable_display_name(cls):
|
||||
return "Airflow optimization"
|
||||
return "Airflow Optimization"
|
||||
|
||||
@classmethod
|
||||
def get_efficacy_specification(cls):
|
||||
|
||||
@@ -67,10 +67,11 @@ class DefaultPlanner(base.BasePlanner):
|
||||
'state': objects.action.State.PENDING,
|
||||
'next': None,
|
||||
}
|
||||
|
||||
return action
|
||||
|
||||
def schedule(self, context, audit_id, solution):
|
||||
LOG.debug('Create an action plan for the audit uuid: %s ', audit_id)
|
||||
LOG.debug('Creating an action plan for the audit uuid: %s', audit_id)
|
||||
priorities = self.config.weights
|
||||
action_plan = self._create_action_plan(context, audit_id, solution)
|
||||
|
||||
@@ -145,7 +146,7 @@ class DefaultPlanner(base.BasePlanner):
|
||||
|
||||
def _create_action(self, context, _action, parent_action):
|
||||
try:
|
||||
LOG.debug("Creating the %s in watcher db",
|
||||
LOG.debug("Creating the %s in the Watcher database",
|
||||
_action.get("action_type"))
|
||||
|
||||
new_action = objects.Action(context, **_action)
|
||||
|
||||
Reference in New Issue
Block a user