Merge "Fix H404 multi line docstring should start without a leading new line"
This commit is contained in:
commit
972999f81d
@ -73,9 +73,8 @@ class TestCase(testtools.TestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""
|
||||
This method allows to initialize authentication before
|
||||
each test case and define parameters of Mistral API Service
|
||||
"""This method allows to initialize authentication before
|
||||
each test case and define parameters of Mistral API Service.
|
||||
"""
|
||||
super(TestCase, cls).setUpClass()
|
||||
|
||||
|
@ -341,8 +341,7 @@ class Engine(object):
|
||||
|
||||
@classmethod
|
||||
def _update_task(cls, workbook, task, state, task_output):
|
||||
"""
|
||||
Update the task with the runtime information. The outbound_context
|
||||
"""Update the task with the runtime information. The outbound_context
|
||||
for this task is also calculated.
|
||||
:return: task, outbound_context. task is the updated task and
|
||||
computed outbound context.
|
||||
@ -367,14 +366,12 @@ class Engine(object):
|
||||
return task, outbound_context
|
||||
|
||||
def _schedule_run(cls, workbook, task, outbound_context):
|
||||
"""
|
||||
Schedules task to run after the delay defined in the task
|
||||
"""Schedules task to run after the delay defined in the task
|
||||
specification. If no delay is specified this method is a no-op.
|
||||
"""
|
||||
|
||||
def run_delayed_task():
|
||||
"""
|
||||
Runs the delayed task. Performs all the steps required to setup
|
||||
"""Runs the delayed task. Performs all the steps required to setup
|
||||
a task to run which are not already done. This is mostly code
|
||||
copied over from convey_task_result.
|
||||
"""
|
||||
@ -414,9 +411,7 @@ class Engine(object):
|
||||
|
||||
|
||||
class EngineClient(object):
|
||||
"""
|
||||
RPC client for the Engine.
|
||||
"""
|
||||
"""RPC client for the Engine."""
|
||||
|
||||
def __init__(self, transport):
|
||||
"""Construct an RPC client for the Engine.
|
||||
|
@ -49,9 +49,7 @@ class Executor(object):
|
||||
|
||||
|
||||
class ExecutorClient(object):
|
||||
"""
|
||||
RPC client for the Executor.
|
||||
"""
|
||||
"""RPC client for the Executor."""
|
||||
|
||||
def __init__(self, transport):
|
||||
"""Construct an RPC client for the Executor.
|
||||
|
@ -26,8 +26,7 @@ WORKFLOW_TRACE = logging.getLogger(cfg.CONF.workflow_trace_log_name)
|
||||
|
||||
def get_task_runtime(task_spec, state=states.IDLE, outbound_context=None,
|
||||
task_runtime_context=None):
|
||||
"""
|
||||
Computes the state and exec_flow_context runtime properties for a task
|
||||
"""Computes the state and exec_flow_context runtime properties for a task
|
||||
based on the supplied properties. This method takes the retry nature of a
|
||||
task into consideration.
|
||||
|
||||
|
@ -45,8 +45,7 @@ class Evaluator(object):
|
||||
@classmethod
|
||||
@abc.abstractmethod
|
||||
def is_expression(cls, expression):
|
||||
"""
|
||||
Check expression string and decide whether it is expression or not.
|
||||
"""Check expression string and decide whether it is expression or not.
|
||||
|
||||
:param expression: Expression string
|
||||
:return: True if string is expression
|
||||
|
@ -129,8 +129,7 @@ class EngineTestCase(DbTestCase):
|
||||
@classmethod
|
||||
def mock_task_result(cls, workbook_name, execution_id,
|
||||
task_id, state, result):
|
||||
"""
|
||||
Mock the engine convey_task_results to send request directly
|
||||
"""Mock the engine convey_task_results to send request directly
|
||||
to the engine instead of going through the oslo.messaging transport.
|
||||
"""
|
||||
cntx = {}
|
||||
@ -143,8 +142,7 @@ class EngineTestCase(DbTestCase):
|
||||
|
||||
@classmethod
|
||||
def mock_start_workflow(cls, workbook_name, task_name, context=None):
|
||||
"""
|
||||
Mock the engine start_workflow_execution to send request directly
|
||||
"""Mock the engine start_workflow_execution to send request directly
|
||||
to the engine instead of going through the oslo.messaging transport.
|
||||
"""
|
||||
cntx = {}
|
||||
@ -155,9 +153,9 @@ class EngineTestCase(DbTestCase):
|
||||
|
||||
@classmethod
|
||||
def mock_get_workflow_state(cls, workbook_name, execution_id):
|
||||
"""
|
||||
Mock the engine get_workflow_execution_state to send request directly
|
||||
to the engine instead of going through the oslo.messaging transport.
|
||||
"""Mock the engine get_workflow_execution_state to send request
|
||||
directly to the engine instead of going through the oslo.messaging
|
||||
transport.
|
||||
"""
|
||||
cntx = {}
|
||||
kwargs = {'workbook_name': workbook_name,
|
||||
@ -166,8 +164,7 @@ class EngineTestCase(DbTestCase):
|
||||
|
||||
@classmethod
|
||||
def mock_run_tasks(cls, tasks):
|
||||
"""
|
||||
Mock the engine _run_tasks to send requests directly to the task
|
||||
"""Mock the engine _run_tasks to send requests directly to the task
|
||||
executor instead of going through the oslo.messaging transport.
|
||||
"""
|
||||
exctr = executor.get_executor(cfg.CONF.engine.engine, cls.transport)
|
||||
@ -176,8 +173,7 @@ class EngineTestCase(DbTestCase):
|
||||
|
||||
@classmethod
|
||||
def mock_handle_task(cls, cntx, **kwargs):
|
||||
"""
|
||||
Mock the executor handle_task to send requests directory to the task
|
||||
"""Mock the executor handle_task to send requests directory to the task
|
||||
executor instead of going through the oslo.messaging transport.
|
||||
"""
|
||||
exctr = executor.get_executor(cfg.CONF.engine.engine, cls.transport)
|
||||
|
@ -64,8 +64,8 @@ class TestTransport(base.EngineTestCase):
|
||||
@mock.patch.object(
|
||||
std_actions.HTTPAction, 'run', mock.MagicMock(return_value={}))
|
||||
def test_transport(self):
|
||||
"""
|
||||
Test if engine request traversed through the oslo.messaging transport.
|
||||
"""Test if engine request traversed through the oslo.messaging
|
||||
transport.
|
||||
"""
|
||||
execution = self.engine.start_workflow_execution(
|
||||
WB_NAME, 'create-vms', CONTEXT)
|
||||
|
Loading…
Reference in New Issue
Block a user