All the changes has been merged to mistral_tempest_tests.
Also scrits has been changed.
Change-Id: I6c514a3c75f1b6e3b94b0e9b0e542697b68d9a02
Partially-Implements: blueprint mistral-tempest-plugin
Now devstack does not setup the deprecated configured cred on Tempest
which is being used here. - https://review.openstack.org/#/c/256164/
get_configured_credential use the deprecated cred and these tests use
that for initiating Manager.
Change-Id: I89713806cb98abaca29b24de585a77f75602bcd7
Closes-bug: #1531049
If cron-trigger is created in different tenant
than workflow's tenant, associated cron-trigger
can not be got. So "model_query" has been used
instead of "secure_query".
Change-Id: Ief78f2cad76e6ca16893bff80c5e75c9015e9c74
Closes-bug: #1522286
The state of a workflow execution was not updated even when all task
executions were completed if some tasks finished at the same time as
other tasks.
Because we were using our connections with transaction isolation
level = REPEATABLE_READ - Each process was using a snapshot of the DB
created at the first read statement in that transaction.
When a task finished and evaluated the state of all the other tasks
it did not see the up-to-date state of those tasks - and so, because
not all tasks were completed - the task did not change the workflow
execution state.
Similar behavior happened with multiple action executions under same
task. On completion, each action execution checked the status of the
other action executions and did not see the up-to-date state of these
action execution - causing task execution to stay in RUNNING state.
Change-Id: I12f66134d92b8ed39df9d6128d7de5ee49aa8623
Closes-Bug: #1518012
Closes-Bug: #1513456
Improved code style, fixed all H405 (Multi line docstring
summary not separated with an empty line) errors.
Change-Id: I6639a2e1a9dc5d3802cb1bda05c5bf9b302bc82f
In py2 filter returns list, but in py3
it returns iterator.
Change-Id: I71db21027bab11c8de715d39e71d0f6317a3f9e0
Partially-Implements: blueprint mistral-py3
* Added 2 tests: for SSHAction and SSHProxiedAction
* 2 VMs are created for test purposes
* SSHProxiedAction test checks that ssh command was
executed on certain VM (which is in guest network)
Closes-Bug: #1505175
Change-Id: I664885b5743c0915f5c42aeecdd3c6c538894453
Fixed the following failure:
AttributeError: 'dict' object has no attribute 'iteritems'
This patch belongs to improvement of python3 compatibility in Mistral.
Partial-Bug: #1378537
Change-Id: Ie6253483bc11fb76f8a93229035ffe2232bb4e3c
With this patch, users can perform operation as following:
DELETE http://127.0.0.1:8989/v2/action_executions/<action_execution_id>
NOTE:
* Added a new config item 'allow_action_execution_deletion', with default
value 'False'.
* The 'allow_action_execution_deletion' item is set to 'True' for
functional testing.
* Only ad-hoc action-execution can be deleted.
* Only completed action execution can be deleted.
Implements: blueprint mistral-action-execution-deletion
Closes-Bug: #1488157
Change-Id: I3729636911a42c273c5a7b2d7fbdaae0da398e31
* Fixed functional test 'test_create_action_execution'
* Sometimes action execution is still not completed and
response contains no output. Changed that mechanism to
wait for completeness.
Change-Id: I6c27dd87e754e9cffc809922ad963ccebdcf7930
* Fixing custom WSME type for json fields. Making it able to convert
values in both direction (to base type and from base type).
* Changed type of ActionExecution resource fields 'input' and 'output'
to new custom json type.
* Fixed action execution controller where necessary.
* Adjusted and refactored action execution controller tests.
Change-Id: I28d0f3204518a2688cb72acefd910d9d99ada66d
* Mistral API now enables POST on /action_executions
* 2 ways of work - synchronous and asynchronous:
returns result immediately or saving action_execution
to the DB. it is controlled by 'save_result' option in
'params' key of the request.
* fixed returning error back in executior
TODO (next commit):
- Implementing 'run-action' cmd in python-mistralclient
Implements blueprint mistral-run-individual-action
Change-Id: I365ec8b92e9bed72bb05c618323f18f5ca7b82e5
Tempest module 'auth' was moved into tempest-lib repo, this change
caused import error, that was fixed in this commit.
Change-Id: I8b93a9ce47cc24afe9b4f52fbc78de79a42b7fa8
Adds the support of two optionals parameters for the cron-trigger resource:
-first_execution_date : supersedes to the first calculation of
"next_execution_time".
-remaining_occurrences: number of occurrences after which the trigger should
be deleted.
The parameter "pattern" is now optional if first-execution-date only is used.
Implements: blueprint mistral-cron-triggers-start-and-repeat
Change-Id: I55bc28e98f89ffdfdce9cb3daa3848a17d85fd20
* Created a Execution hierarcy mapped on a single table:
- ActionExecution
- WorkflowExecution
- TaskExecution
* Created necessary associations within Execution hierarchy
* Created necessary methods for Execution objects on DB API
* Created Definition hierarchy mapped on separate tables:
- Workbook
- WorkflowDefinition
- ActionDefinition
* Renamed attributes
- 'wf_name' -> 'workflow_name'
- 'wf_spec' -> 'spec'
* Fixed all unit tests
TODO:
* Complete renaming throughout the code
* Further refactoring of workflow engine
Change-Id: I0032bea573d9200025f9f7dd951e93cb6f1661bb
For the current moment we have tests for some OpenStack action for Mistral v1,
to cover main functionality of these actions in v2 new test suite was added.
New tests will check that all implemented OpenStack actions are in the working
state and Mistral can connect to OpenStack components like Heat, Nova, etc.
and execute basic operation: get list of objects.
Change-Id: Ie6cda877c12509e23a81ccf5da48d870229b3779
- Separated v1 and v2 api tests for workbooks and executions;
- Added more tests scenarios;
- Optimize methods realization for v2 tests.
Change-Id: Ic24383bc7e6c059088e98eeeeab28ae7bda2de6a
Closes-Bug: #1384564
- Added API tests which check main api calls to cron-trigger endpoint
- Fixed tearDown method (there was a problem when item array
had a few elements, not all of them were deleted)
Partly implements: blueprint mistral-triggers-functional-tests
Change-Id: Ibba7cd03e6ccdf06c76ea4ea161542b954faee0f
After testing new script run_functional_tests one destructive issue
was discovered that after this script all executions were deleted.
This situation was fixed. Now in all create methods identifier of
created object saves in array and in tearDown methods tests delete
only objects which were saved in appropriate arrays.
Change-Id: I442aecd346c003cd38ce6977e4f69f9bfa32e894
- Added script that can run part of functional tests locally
- Added needed mocks in base.py file so that we don't interact with keystone
- Added small a description how to run new script
Change-Id: I1867fb93f540c8f061fd09c40a283ce1ef2c072c
- Added integration tests for API version 2
- Refactor base.py, separate methods for v1 and v2
- Created second endpoint /v2 in keystone in devstack installation
Change-Id: Ibe23971b2335242ed72b837bfc1f861d0a74e395
* We shouldn't set execution state in ERROR if
task has on-error or on-finish property
* Fix wait_success method in functional tests
Change-Id: I48e452d5974dd854eb14dcaf23d13e81107a03dc
* Cosmetic changes in integration tests on
OpenStack Actions according comments in
https://review.openstack.org/#/c/113881/
Change-Id: I660e1435e34d000b9de9b59769c73b04842ff724