* Refactored tests hierarcy (moved get_resource to the base class)
* Fixed logic in abstract engine (transaction scoope was wrong)
* Added stub methods for context manipulations (not everywhere yet)
* Refactored actions
* Created ECHO action to be able to emulate required output
* Added simple data flow test (two dependent tasks)
TODO:
* More tests
* Refactor actions according to the latest discussions
Change-Id: I5ba5e330110889014eeca53501ddae54dc9a1236
To make it easy to set Mistral for debugging.
1) Make engine configurable.
2) Enable debugger via command line. Passing --use-debugger will make PyDev or PyCharm show
local variables in debugging session.
Also, a tiny fix in action_factory.
Change-Id: Id054ae5156649b1f6bbba7131e54bf21d71c659a
Fixed several errors:
E1003
E1101
It is impossible to fix all E1101 errors: looks like we have
problems with outdated DataBase models.
Change-Id: I46863c553f033e5f9e4ae9cb9c20e297c099a114
Partial-Fixes: bug #1281164
* Deleted exception when 'output' block in REST_API task
is not defined. In this case result is the whole object
returned from extract_state_result
Fixes bug: #1280117
Change-Id: I8143283133994d39e34e9c82493b2cff67fa0d59
* Added ExpressionEvaluator interface and YAQL implementation
* Removed yaql_utils, evaluator is now a more flexible replacement
* Fixed the places where yaql_utils was used
* Adjusted test cases
Change-Id: I7de70e678c211df34788763047b8361de0d3902a
* Refactored API layer so that we can work with 'context' as with a
json object in underlying layers (DB, engine, etc.) rather than
a string
* Added "context" parameter in all required places
* Added necessary Data Flow related properties to DB models
* Refactored and fixed a series of tests
* Minor formatting changes
TODO:
* Calculation of task incoming context
* Abstract interface for expression evaluator
* Data Flow related tests
Partially implements blueprint: mistral-dataflow
Change-Id: Ie7f94d79265e9861f7ad15c76ff6d788ec62b683
* Fix get task properties, get task in DSL
* Evaluating task on success/error/finish properties in engine:
- evaluate YAQL conditions
- schedule tasks
* Unit tests for handling success/error/finish
* For real work with context there is need to store
it somewhere
Implements: blueprint schedule-tasks-after-completion
Change-Id: Ia9c34e755055ff0273dcd79a314858dbfbcc2fa9
Added send_email to action types and action factory.
Now it works end-to-end.
NOTE:this renames DSL from action.parameters.responce
to action.output. Other projects will need to adjust.
Tested manually with mistral-extra/examples/webhooks/cmd/run.py,
It works, almost: except a bug causing exception on parsing out results.
In discussion, but a fix should go in separate commit.
Also, small fixes:
action_factory:31 - used to blow up when action has no 'parameters'
dsl.py:32 - return details on parsing errors (error, line, column)
api/config.py - deleted: not used
Change-Id: Ie7079eb9589c23cc6704f8e8739af67a635f1c77
Basic send-email functionality and unit tests
See comments in test_send_email_action on how to run with real smtpd.
Implements: blueprint mistral-std-send-email-action
Change-Id: Ib1d460d26ce54f4ab85d34b18947d858ab471dfd
1. Add couple of negative tests, find the way, more to go.
2. Add assertNotFound to the base test class for convenience.
3. MistralException - added default message to enable default instantiation - make mock.assertRaise fails when exception has no default constructor
Change-Id: I708637e3995597a819571a90f3292d6e34deab4e
* For HTTP GET task input is converted to request url parameters
* For HTTP POST/PUT - into request body
Change-Id: Ibc863ffb99ffdd0099f9ba2f43178e02dc1dd0c2
* Non-Mistral actions gets a JSON response
from which result can be extracted with
YAQL-expression
* Unit test
* Feature is added to both engines
Change-Id: Iae6aa031e6b5700b3a08ee184f5eae291458a8c4
* Moved pecan configuration to oslo config
* Refactored functional base test
* Got rig of thread local related code in mistral/context.py
* Added new exception ApplicationContextNotFoundException
* Fixed example configuration file
* Made minor cosmetic changes (blank lines, naming)
Change-Id: I1899ce2562a34ebafa20c5735bdf4f0c80dd0175
* in case MISTRAL_REST_ACTION we add Mistral-specific
headers, in case REST_ACTION - we are not.
* new class for this type of action is unnecessary,
all of these are Rest, only properties can be edited
in factories methods
Change-Id: I431e5009a531da6bea191e7253d43b4cd58c46fb
* Access to new task properties:
input, onSuccess, OnError; any task property
* 'dependsOn' is renamed to 'requires' and returns dict object
which contains conditions of task transition.
DSL can be defined either:
task3:
requires: [task1, task2]
or:
task3:
requires:
task1: condition1 (or empty)
task2: condition2 (or empty)
Change-Id: Ic3ab5754443100e101f04260d9054b0a604fcd6d
* Moved iethods start_workflow_execution and convey_task_result into
abstract engine
* Refactored existing local engine unit tests
* Added simple unit tests for scalable engine
* Minor cosmetic changes (imports, blank lines)
Change-Id: Ic781b134068f52ed5827b945fb57b202239fe9c4
* Action definition was combined in actions module
* workflow from both single and scalable engines were deleted
* task from single engine was deleted
* unit test 'test_workflow' was deleted due to deleting workflow
* minor fixes to single engine
Next step will be extracting and combining common parts
of scalable and single engine.
Change-Id: I15fbbb7f9d5e453c17625423eeb1bf841a19db18