Removing engine redundant parameter

Change-Id: Ief5a4d08187049e855da3b03fab521e69f0e08dd
This commit is contained in:
Renat Akhmerov 2014-09-18 16:20:36 -07:00
parent 321f95151c
commit 74ebdf1122
4 changed files with 4 additions and 11 deletions

View File

@ -87,10 +87,7 @@ def launch_engine(transport):
)
engine_v1 = engine.get_engine(cfg.CONF.engine.engine, transport)
engine_v2 = def_eng.DefaultEngine(
rpc.get_engine_client(),
rpc.get_executor_client()
)
engine_v2 = def_eng.DefaultEngine(rpc.get_engine_client())
endpoints = [engine_v1, rpc.EngineServer(engine_v2)]

View File

@ -41,9 +41,8 @@ WF_TRACE = logging.getLogger(cfg.CONF.workflow_trace_log_name)
class DefaultEngine(base.Engine):
def __init__(self, engine_client, executor_client):
def __init__(self, engine_client):
self._engine_client = engine_client
self._executor_client = executor_client
@u.log_exec(LOG)
def start_workflow(self, workflow_name, workflow_input, **params):

View File

@ -91,10 +91,7 @@ class EngineTestCase(base.DbTestCase):
self.engine_client = rpc.EngineClient(transport)
self.executor_client = rpc.ExecutorClient(transport)
self.engine = def_eng.DefaultEngine(
self.engine_client,
self.executor_client
)
self.engine = def_eng.DefaultEngine(self.engine_client)
self.executor = def_exec.DefaultExecutor(self.engine_client)
LOG.info("Starting engine and executor threads...")

View File

@ -68,7 +68,7 @@ class DefaultEngineTest(base.DbTestCase):
# Note: For purposes of this test we can easily use
# simple magic mocks for engine and executor clients
self.engine = d_eng.DefaultEngine(mock.MagicMock(), mock.MagicMock())
self.engine = d_eng.DefaultEngine(mock.MagicMock())
def test_start_workflow(self):
wf_input = {