* Created AdHocAction that works as a transforming wrapper
for any other action (uses action specification dictionary)
* Added tests for AdHocAction
* Moved and refactored tests for email and echo actions from
old package
TODO:
* Integrate AdHocAction with action factory (it is a special built-in
action class and requires some special action on action factory side)
* Refactoring executor to use new action infrastructure
* Remove old action infrastructure
* Action plugin architecture
Partially implements: blueprint mistral-actions-design
Change-Id: Ieaf479047bfcaf3da61d40f28f108d198af6d16f
* Created MistralHTTPAction
* More unit tests
* Refactoring
TODO:
* Ad-hoc per-workflow namespaces and actions
* Refactoring executor to use new action infrastructure
* Remove old action infrastructure
* Action plugin architecture
Partially implements: blueprint mistral-actions-design
Change-Id: I6856d6587243872a67fa42efff0bf3f88ec19d82
* Base class for actions (Action)
* Class for representing action namespaces (NameSpace)
* Module action_factory.py for registering action classes, accessing
them and creating action instances
* Unit tests for action_factory.py
* Standard actions (echo, http, email)
TODO:
* Ad-hoc per-workflow namespaces and actions
* Mistral HTTP standard action
* Refactoring executor to use new action infrastructure
* Remove old action infrastructure
* Action plugin architecture
Partially implements: blueprint mistral-actions-design
Partially implements: blueprint mistral-change-rest-api-to-http
Change-Id: I8e79b1f8173809584f0156e666e1675f5bd7bb37
* Renaming task 'input' property to 'parameters' according to BP
* Fixing auth token generation related test
* Small refactoring in expressions
* Formatting changes
Partially implements: blueprint mistral-actions-design
Change-Id: I8659145d022ac4a2895c9d06f85f0961bf0b4f50
* We need an another way to communicate with VM,
so SSH is this way. Also it gives a possibility
to check if VM operation system is up by sending
a simple ssh command to it.
* Added SSH Action
* Only password access, forwarding public/private keys
will be in the future
* It is tested on real VM. However, it needs to be tested
by somebody else
Implements blueprint mistral-ssh-action
Change-Id: I7c51453afb6a926bbce01f4a9065a3c313a79fff
The local engine is replaced in process executor using the oslo.messaging
fake transport. The local engine module is removed here along with related
unit tests. Some unit tests are rewritten to use the ScalableEngine. An
EngineTestCase is included in the base module of tests to simplify engine
testing.
Change-Id: I1a49a53eac87a209660c493fd7c3fe3e914fd092
Implements: blueprint mistral-inproc-executor
* Fixed repeatable task scheduling. See bug description for
more information.
* Small fix in data flow test
Fixes bug: #1301866
Change-Id: I40e653ac242df0f5deee8b72ac77a7c04e4fda2a
Pick up cosmetic changes from https://review.openstack.org/#/c/80127/10
* rename exec_flow_context to task_runtime_context.
* Fix comments to start with cap letter and end with a period.
Change-Id: Ic74f045f8d401053a983b1f6356a8d3562b23f2e
* Action factory creates rest_action with either
parameters or body accordingly to request method
(for GET - parameters, for POST/PUT - body)
* Fix apply context method:
* All data which is not resolved by YAQL is ignored
* Rest action send body in form json.dumps(data)
(it is better for nested dictionary)
* Improved some unit tests
* With this patch Mistral is able to connect to Nova
and create instance
Change-Id: Ibc73a7dc2de4339acbb9310755c2c53028815b38
* The issue popped up after release of python-keystoneclient 0.7.
The issue is caused by new keystoneclient not accepting
project_id and trust_id simultaneously as constructor parameters.
Change-Id: Id0b7b582e9b794dace0f440df582ff9502b781c5
* In case if we define the specific output
in action, we should evaluate all given YAQL
expressions and return calculated dict,
otherwise - return raw result
Change-Id: I8f4a91c7fb0de743793c7cd66b892e038e25332f
Refactored launch script to start the API and executor on the same process
so the transport for a oslo.messaging fake driver can be shared. A transport
attribute is added to the abstract engine as a class attribute to reference
the transport object.
Change-Id: I4b8684ebded9eb993749f2503380e078087edd7d
Implements: blueprint mistral-inproc-executor
In this implementation there is only a provision to repeat a specific action.
- Features like configurable iterations, delay, break-on are implemented.
- All final data is published to the context and there is no per iteration
persistence.
- The iteration context which is specific to the scope is saved in the
exec_flow_context property of a task.
Change-Id: I1e9ff7847f0046e11d3b32eec65f664c2b09d3b1
* Add creating keystone auth_token in context
when task is scheduled for execution. Auth token
is created from workbook trust_id in case Auth_enable
* Added transforming values of task_spec and service_spec
with YAQL and context.
* This feature affects some unit tests, so they are fixed
* Added unit tests
Partially implements: blueprint mistral-dataflow
Change-Id: I15794da427bfc7babbc4e3d58a90200c10a19a72
* keystone_authtoken is renamed to keystone due to
unexisting name. It isn't able to create workbook
with auth_enable=True without this fix
Change-Id: I3d865e31b87dbb18e62ee3d6fa4ca5054ff5c8fd
* When parsing yaml we can't rely on order of properties
because it's against yaml specification
* In tests we often make assumptions about list items order
Change-Id: I536bc31ba7bee68e2904a23af73004f2e0ba2261
* Executor launch script should now start engine because
it calls engine.convey_task_result() directly. It's a
temporary solution until engine is a standalone process.
When it's done executor will be sending a message back to
engine instead of making a local call.
Change-Id: I4666ca5f1a9cb093e8b7c9e640048f0176955595
* "events" are renamed to "triggers"
* triggers moved out of workflow section
Implements: blueprint mistral-rename-event-to-trigger
Change-Id: I5b76e9c063a3ce9eec5d485bb5db5e22ac7981d4
* Implemented new object model
* Implemented spec validation
* Old DSL parser was deleted
* All code is replaced by new workbook spec
* Also tests are fixed
* events -> triggers
* Unit tests
Implements: blueprint mistral-dsl-model
Partially implements: blueprint mistral-dsl-validation
Partially implements: blueprint mistral-rename-event-to-trigger
Change-Id: I782b7983ddc724375229587f467c55ad9341478b
Ported task executor to oslo.messaging. The executor module is
replaced with RPC server/client named Executor and ExecutorClient
respectively to handle task execution. The old executor module is
deleted. The engine is modified to use the ExecutorClient to send
task requests over the transport to the Executor. The launcher is
modified to start the new Executor.
Change-Id: Ibce01813e51c2220c45e05bb820b4729027446a3
Implements: blueprint mistral-oslo-messaging
* 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