Decoupled Goal from Strategy
In this changeset, I decoupled the notion of Goal from the Strategy by making it a distinct object. Goals are plugins that can be loaded just like for the strategies. Partially Implements: blueprint efficacy-indicator Change-Id: I4378dccd508170b305aa968843228bbc8af78895
This commit is contained in:
@@ -66,7 +66,7 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient):
|
||||
this audit template.
|
||||
:param extra: Metadata associated to this audit template.
|
||||
:return: A tuple with the server response and the created audit
|
||||
template.
|
||||
template.
|
||||
"""
|
||||
|
||||
parameters = {k: v for k, v in kwargs.items() if v is not None}
|
||||
|
||||
@@ -165,7 +165,7 @@ class TestAuditTemplate(base.BaseInfraOptimTest):
|
||||
|
||||
@test.attr(type='smoke')
|
||||
def test_update_audit_template_replace(self):
|
||||
_, new_goal = self.client.show_goal("SERVER_CONSOLIDATION")
|
||||
_, new_goal = self.client.show_goal("server_consolidation")
|
||||
_, new_strategy = self.client.show_strategy("basic")
|
||||
|
||||
params = {'name': 'my at name %s' % uuid.uuid4(),
|
||||
|
||||
@@ -24,7 +24,7 @@ from watcher_tempest_plugin.tests.api.admin import base
|
||||
class TestShowListGoal(base.BaseInfraOptimTest):
|
||||
"""Tests for goals"""
|
||||
|
||||
DUMMY_GOAL = "DUMMY"
|
||||
DUMMY_GOAL = "dummy"
|
||||
|
||||
@classmethod
|
||||
def resource_setup(cls):
|
||||
|
||||
@@ -30,7 +30,7 @@ CONF = config.CONF
|
||||
class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest):
|
||||
"""Tests for action plans"""
|
||||
|
||||
BASIC_GOAL = "SERVER_CONSOLIDATION"
|
||||
BASIC_GOAL = "server_consolidation"
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
|
||||
@@ -29,15 +29,15 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest):
|
||||
"""Tests for action plans"""
|
||||
|
||||
def test_execute_dummy_action_plan(self):
|
||||
"""Execute an action plan based on the DUMMY strategy
|
||||
"""Execute an action plan based on the 'dummy' strategy
|
||||
|
||||
- create an audit template with the dummy strategy
|
||||
- create an audit template with the 'dummy' strategy
|
||||
- run the audit to create an action plan
|
||||
- get the action plan
|
||||
- run the action plan
|
||||
- get results and make sure it succeeded
|
||||
"""
|
||||
_, goal = self.client.show_goal("DUMMY")
|
||||
_, goal = self.client.show_goal("dummy")
|
||||
_, audit_template = self.create_audit_template(goal['uuid'])
|
||||
_, audit = self.create_audit(audit_template['uuid'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user