2221 Commits

Author SHA1 Message Date
Luong Anh Tuan
1827e5434e Using sys.exit(main()) instead of main()
TrivialFix: Similar [1] in Kolla project
As we known, Exceptions are raised by the sys.exit() function. When they
are not handled, no stack traceback is printed in the Python interpreter.
Therefore, when using sys.exit(main()) instead of main()
may be more readable and reasonable.

[1] https://review.openstack.org/#/c/349353/

Change-Id: Ic71d4bfb1085c68ea9eb7e1382e7263a81634ad1
2016-09-26 10:52:42 +07:00
OpenStack Proposal Bot
acaafb4ab9 Updated from global requirements
Change-Id: I45cc79481a67249570d6f3a96a9a1497f02b5788
2016-09-25 09:57:18 +00:00
Jenkins
bdb357f24a Merge "Update UPPER_CONSTRAINTS_FILE for stable/newton" 2016-09-25 08:17:10 +00:00
Jenkins
2bada97acf Merge "Add unit test case for deletion of execution in case of (error and cancelled)" 2016-09-23 10:51:59 +00:00
Jenkins
61f4de482d Merge "Fix for raising excepton from kombu" 2016-09-23 07:58:13 +00:00
avnish
26894df15d Update UPPER_CONSTRAINTS_FILE for stable/newton
Change-Id: Ibe84879a75c54d56f7150d991c2ce6fbbf9c3377
2016-09-23 12:46:41 +05:30
Jenkins
773848fad7 Merge "Adding a script for fast mistralclient help generation" 2016-09-22 12:38:59 +00:00
Jenkins
0b747c2808 Merge "Make Javascript implementation configurable" 2016-09-22 11:57:36 +00:00
Jenkins
bfe8303ad4 Merge "Fix for timeouting actions on run-action" 2016-09-22 10:08:14 +00:00
Dawid Deja
cca13bb3db Fix for timeouting actions on run-action
Change-Id: I2aaed3c431134312942ab71ea8ad95f9b8529234
Partial-Bug: #1624284
2016-09-22 09:25:14 +00:00
Jenkins
2c56e4a665 Merge "Fix a typo in access_control.py" 2016-09-22 05:36:46 +00:00
Jenkins
0e120ed41f Merge "Avoid storing workflow input in task inbound context" 2016-09-22 04:36:17 +00:00
zhangyanxian
6252dedb25 Fix a typo in access_control.py
TrivialFix

Change-Id: Ia079e46cd4b1e2829a9933d9e7b366a2f8b3fa3a
2016-09-22 01:13:44 +00:00
Nikolay Mahotkin
259868e6fe Adding a script for fast mistralclient help generation
* This script allows generating helpstrings
   of all mistralclient commands and adopt them
   to rst format.
 * This script is just POC and requires a further
   manual editing in order to make the document
   more clear.

Change-Id: If5f9144a254ef0b97c17e66638641e1052cc08d1
2016-09-21 13:36:15 +00:00
Endre János Kovács
03e3ebe021 Make Javascript implementation configurable
Currently the only Javascript implentation supported by the
std.javascript action is PyV8, a project that has been abandoned
for about two years and can only be compiled with an outdated
version of V8, one affected by several security vulnerabilities.

This change adds support for v8eval, a more recent interface to V8
that is still being maintained.

Change-Id: Id9cb89ffb05b37ef525a6085d49229de63420bbf
2016-09-21 15:07:09 +02:00
Lucky samadhiya
50671eaeb7 Add unit test case for deletion of execution in case of (error and cancelled)
Change-Id: I07d5e01883adc7d1bb3db73b7b5ccfc17772c867
2016-09-21 17:16:29 +05:30
Jenkins
04ac956138 Merge "Add __ne__ built-in function" 2016-09-21 11:33:55 +00:00
Jenkins
82553f5221 Merge "Fixed task in_bound context when retrying" 2016-09-21 11:27:26 +00:00
Renat Akhmerov
a4287a5e63 Avoid storing workflow input in task inbound context
* 'in_context' field of task executions changed its semantics to
  not store workflow input and other data stored in the initial
  workflow context such as openstack security context and workflow
  variables, therefore task executions occupy less space in DB
* Introduced ContextView class to avoid having to merge
  dictionaries every time we need to evaluate YAQL functions
  against some context. This class is a composite structure
  built on top of regular dictionaries that provides priority
  based lookup algorithm over these dictionaries. For example,
  if we need to evaluate an expression against a task inbound
  context we just need to build a context view including
  task 'in_context', workflow initial context (wf_ex.context)
  and workflow input dictionary (wf_ex.input). Using this
  class is a significant performance boost
* Fixed unit tests
* Other minor changes

Change-Id: I7fe90533e260e7d78818b69a087fb5175b9d5199
2016-09-21 13:32:44 +03:00
Jenkins
df950beb27 Merge "Updated from global requirements" 2016-09-21 10:12:11 +00:00
gecong1973
8ba7de91ee Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to
have more clear messages in case of failure.

Change-Id: Ida4c8a8159b2ebc2826646052f5ca4dbc8229575
2016-09-21 16:42:26 +08:00
OpenStack Proposal Bot
2ad512ae60 Updated from global requirements
Change-Id: I1433b7d70e9731ccaea2b90a474194517a684fb9
2016-09-21 07:28:01 +00:00
gecong1973
6b88627f27 Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining __eq__(),
one should also define __ne__() so that the operators will behave
as expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: I4c1b630d14030c9e451e58342b0d44e2058fa51f
2016-09-20 11:01:41 +08:00
Doug Hellmann
92b901096f Update reno for stable/newton
Change-Id: I3a748b8424513d403782646769c4b705c4ec04a8
2016-09-19 18:11:28 -04:00
Jenkins
1281036a81 Merge "Remove context.spawn" 2016-09-19 11:41:48 +00:00
Thomas Herve
7d03d18d55 Remove context.spawn
The spawn function in the context module is broken and isn't used, let's
remove it.

Change-Id: I9c88651a42515d6da7836cd72c24c0c719f31728
2016-09-19 12:02:34 +02:00
Jenkins
90e1c10afe Merge "Enable changing of rpc driver from devstack" 2016-09-19 09:09:28 +00:00
Jenkins
86e64a4ee5 Merge "Abstract authentication function" 2016-09-19 06:45:45 +00:00
Jenkins
89c2082e89 Merge "Updating mistralclient docs" 2016-09-18 09:13:23 +00:00
Jenkins
56a0ef4e33 Merge "Take os_actions_endpoint_type into use" 2016-09-16 13:48:44 +00:00
Dougal Matthews
6e6461f9bf Correct documentation about task attributes 'action' and 'workflow'
The current documentation states that one is required. However, this is not
enforced in the code and in mistral/workbook/v2/tasks.py if neither are
provided then the `std.noop` action is used instead.

Closes-Bug: #1624012
Change-Id: I5f5a39bad3e671741bc9fd1b142df9aef0b87a36
2016-09-16 12:20:43 +01:00
Nikolay Mahotkin
b1acf3da60 Updating mistralclient docs
* Mistralclient guide doc is updated
   using the current mistral CLI help strings.

Change-Id: I41527f71622077da353953fa8e6717d61571a164
2016-09-16 12:08:01 +03:00
Winson Chan
f9c9ca8260 Abstract authentication function
Abstract authentication function so plugins for other authentication
backends can be implemented in cases where keystone is not used. Currently,
mistral is hard coded to support keystone and keycloak. The domain/project
related trust that is specific to keystone is not addressed.

Change-Id: I21994ab20af519b2ba85efd7cbe043547988e5b3
Implements: blueprint mistral-abstract-auth
2016-09-15 23:37:30 +00:00
Dawid Deja
22244e0d62 Fix for raising excepton from kombu
Oslo wraps exceptions, we need to do same in kombu driver.

Change-Id: I85c7bc94ef991fd0afc9485ffcff0db8bc818592
Closes-bug: 1608909
2016-09-15 17:18:39 +02:00
Jenkins
90fa504646 Merge "Added unit tests for Workbook and Workflow filtering" 2016-09-15 12:37:38 +00:00
Jenkins
d91efc78c6 Merge "Add functional tests for event engine functions" 2016-09-15 12:10:41 +00:00
Jenkins
9eed138962 Merge "Remove workflow spec, input and params from workflow context" 2016-09-15 12:10:30 +00:00
Jenkins
34aaa5a277 Merge "Add a smarter delay between workflow completion checks" 2016-09-15 12:10:12 +00:00
Jenkins
9ddfc91c20 Merge "Optimize the logic that check if 'join' task is allowed to start" 2016-09-15 12:10:06 +00:00
Jenkins
4d3dcc91b4 Merge "Copy cached WF spec stored by definition id into WF execution cache" 2016-09-15 12:10:00 +00:00
Renat Akhmerov
097c68f641 Remove workflow spec, input and params from workflow context
* The reason to remove workflow spec and input is optimizing
  DB space taken by task execution objects, now they are very
  heavy if case of large workflows because their inbound contexts
  always contain a full workflow specification
* execution() YAQL function now doesn't take values from task
  context, it just does a simple DB lookup

Change-Id: I00b88d4ca75f334ebce764332c21aef96eba5414
2016-09-15 14:27:25 +03:00
Renat Akhmerov
23ff5605a6 Add a smarter delay between workflow completion checks
Change-Id: Id47f01479fe7c60e8b0e5061f01260a9157c5c88
2016-09-15 14:27:25 +03:00
Renat Akhmerov
9d06a61fe4 Optimize the logic that check if 'join' task is allowed to start
* Moved DB related lookup functions from workflow/utils to
  a separate module lookup_utils
* Optimized data access pattern where we calculate 'join'
  states induced by upstream tasks, applied caching for some
  lookup operations
* Added caching in direct workflow specification for inbound
  and outbound task specs, if workflow size is large calculating
  them may be expensive
* Added an adaptive delay between calls that refresh 'join'
  task state based on a number of unfulfilled preconditions
  returned by workflow controller

Change-Id: I383fa52f2f05877df7522048020cc7ff280324a2
2016-09-15 14:27:25 +03:00
Renat Akhmerov
a0f6c7ae3f Copy cached WF spec stored by definition id into WF execution cache
* When we start a workflow we don't need to reparse a workflow
  specification if we request it by workflow execution id for the
  first time. Instead, we can just update workflow execution
  specification cache with the value from workflow definition
  specification cache. For large workflows, it significantly
  reduces time of workflow start.

Change-Id: Ibe4c788040996e3f119c96cb130fdc95d46286d9
2016-09-15 14:27:22 +03:00
Lingxian Kong
3455dd68e9 Add functional tests for event engine functions
This test class doesn't fully test event engine functions, because
we can not send real notifications to the internal message queue to
trigger the specified workflows.

So, before notification is supported in Mistral, we can only test the API
functions.

Change-Id: I4289dac17f19cd2ce3c214c5625f3b7d9db605de
Implements: blueprint event-notification-trigger
2016-09-15 23:11:43 +12:00
Jenkins
1b22267b0f Merge "Fix for raising exception directly to kombu" 2016-09-15 08:57:24 +00:00
Hardik Parekh
09e2358cc8 Added unit tests for Workbook and Workflow filtering
Change-Id: I2413f4a135b88b9e6e890ff91771ee4af8225dae
2016-09-15 10:23:29 +05:30
Dawid Deja
b1937191ee Delete unnecessary comma
Change-Id: I7049ec25870a148a78d619eb39c90d032a287af4
Closes-bug: 1623414
2016-09-14 12:14:16 +02:00
Hardik Parekh
211456a0c8 Fixed task in_bound context when retrying
Task's in_bound context was updated incorrectly.
When task with retrying policy is retrying second time
it cannot get previously published variables.

Change-Id: Ia909a314bcf6a4fc2dc873baec82c11f8555811c
2016-09-14 11:20:51 +05:30
Jenkins
94bfbeabfa Merge "Using count() instead of all() for getting incompleted tasks" 2016-09-13 18:22:16 +00:00