Add strategy template doc
Developer should provide a detailled documentation about his strategy algorithm to make it even easier to use by a Watcher end user. I propose in this changeset a template for strategy documentation. you will find also a example with basic consolidation strategy. Change-Id: I66da1a33b87a94b508dd23ac7dce4cae6f4e068b
This commit is contained in:
@@ -37,9 +37,9 @@ class ServerConsolidation(base.EfficacySpecification):
|
||||
indicators.InstanceMigrationsCount(),
|
||||
]
|
||||
|
||||
def get_global_efficacy_indicator(self, indicators_map):
|
||||
def get_global_efficacy_indicator(self, indicators_map=None):
|
||||
value = 0
|
||||
if indicators_map.instance_migrations_count > 0:
|
||||
if indicators_map and indicators_map.instance_migrations_count > 0:
|
||||
value = (float(indicators_map.released_compute_nodes_count) /
|
||||
float(indicators_map.instance_migrations_count)) * 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user