70 Commits

Author SHA1 Message Date
Vitalii Solodilov
e01daded0f Added thread pool for eventlet executor mode
Change-Id: I78c43cfa530c7f1721b3281a0afeea585ff35251
2018-04-08 16:10:50 +04:00
Winson Chan
3f48e24dc4 Implement notification of execution events
Introduce execution events and notification server and plugins for
publishing these events for consumers. Event notification is defined per
workflow execution and can be configured to notify on all the events or
only for specific events.

Change-Id: I9820bdc4792a374dad9ad5310f84cd7aaddab8ca
Implements: blueprint mistral-execution-event-subscription
2018-02-24 07:25:55 +00:00
Chandan Kumar
4f57c90d69 Remove intree mistral tempest plugin
* https://review.openstack.org/524869 moves the intree mistral
  tempest plugin to a new home openstack/mistral-tempest-plugin
  let's use it.

* It also removed intree mistral tempest plugin as well as fix the
  jobs to use the same.

Change-Id: I28ba8408452637aa093b343441f3715dc4754a3f
2017-12-26 07:49:14 +00:00
Brad P. Crochet
9d2f12bb0b Actually add the yaml_dump expression
The previous patch didn't actually add the yaml_dump expression. It just
created the function. This actually loads it.

Change-Id: I29eff8bbbd78a831bca636fc081d6423b381f162
2017-12-21 04:47:33 +00:00
Adriano Petrich
ad733d3112 Add executions yaql filter
This allows for filtering or executions

Implements: blueprint mistral-workflow-executions-yaql-function
Change-Id: I8d41c662d8659375750b52f7510e9a35f8b42f93
2017-12-20 13:34:33 +00:00
Dai Dang Van
49ed570cfe Implement policy in code (1)
This commit prepare for implementing policies in code[1].

Like oslo.config, with oslo.policy, we can define all of
default rules in code base and only change some rules
via policy file. Another thing that we should use yaml
format instead of json format.

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I2051b6c25333c95aa9ea6786964d4ab710ea93e8
2017-11-27 02:46:32 +00:00
Dougal Matthews
6fc541a44c Add a json_dump expression function
This is a new and simplified version of the json_pp function. It uses on
the standard jsonutils formatting and wont output the context if not
argument is provided.

Change-Id: I37f69d14e7cf4f57b910b355d7ccd31c9cd73d10
2017-11-03 07:35:03 +00:00
Brad P. Crochet
6bd96d70b1 Add yaml and json parsing functions
Sometimes you'll get a string back from some action (like swift
get_object) and it will be in either a yaml or json format. These
functions will allow you to parse those into a useful object.

Change-Id: I375219f4b019319e1b3d756dca512f7f90cd097f
2017-10-12 16:50:03 -04:00
Hangdong Zhang
060d400d30 Update and optimize documentation links
1. Update URLs according to document migration
2. Update the dead and outdated links

Change-Id: I9dd7b1ae7fb9fcb0af1e22f789ffa89138649862
2017-07-19 17:10:49 +08:00
csatari
6c362ce53e Adding warning-is-error to doc building
As it is required in [1] warning-is-error should be
set for doc building. This change sets the flag and
corrects the warnings.

[1]: http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html

Change-Id: Ia93fd13645830cd8994ef283b72f31cb22cf3fe9
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: csatari <gergely.csatari@nokia.com>
2017-07-13 10:11:15 +02:00
Jenkins
faaa8b5d78 Merge "Change author in setup.cfg" 2017-06-14 09:54:46 +00:00
Luong Anh Tuan
c9f90557a8 Change author in setup.cfg
Changed author to OpenStack in setup.cfg

Change-Id: Id634dff8e2dee1259a5599f5e113e5949f9500ba
2017-06-12 20:45:04 +07:00
Van Hung Pham
10c70b707d Optimize the link address
Update link address to ensure safety and preciseness

Change-Id: Ia5da7111faceee5ecfb39f093ed2afee6902776b
2017-06-10 01:23:58 +07:00
Winson Chan
b6de4720db Fix WSGI script for gunicorn
The previous patch to add support for apache breaks gunicorn. The gunicorn
setup loads the mistral.api.wsgi module and requires the application
variable be assigned. The support for apache make the assumption that the
mistral.api.wsgi be called as a python script. This patch moves the init
function required by apache to a different location.

Change-Id: Ib5af50a55d3f3bb9d0fa0d1ee6b8e7564f909d70
Closes-Bug: #1689943
2017-05-10 21:31:42 +00:00
Winson Chan
eb09a90749 Make rpc_backend not engine specific
The rpc_backend with kombu and oslo are being used by the executor
and event engine as well. This patch move the rpc_backend up one
level so it's not engine specific. Also Event engine has its own module
and the EventEngine class is defined in the engine module. This patch
moves the EventEngine to it's own base file in the event_engine module.

Implements: blueprint mistral-actions-run-by-engine

Change-Id: Ie814a26e05f5ca6bfba10f20a7d5921836aa7602
2017-04-27 20:02:40 +00:00
Winson Chan
62d8c5edaf Add option to run actions locally on the engine
Make executor pluggable and allow option to run the executor
locally on the engine or remotely over RPC.

Change-Id: I7cfb13068aa1d1f88136eaa092e629c34b78adf2
Implements: blueprint mistral-actions-run-by-engine
2017-04-27 20:02:27 +00:00
Jenkins
b037fe58f8 Merge "Advanced publishing: add 'global' function to access global variables" 2017-04-19 11:18:24 +00:00
Jenkins
ad5af62548 Merge "Enable WSGI under Apache in devstack" 2017-04-19 09:55:18 +00:00
Brad P. Crochet
8f335f544e Enable WSGI under Apache in devstack
Add support for enabling WSGI in Apache for the devstack plugin. This
will allow an additional CI gate.

Change-Id: I953dbdab71029b392f8846c50fa3d801c293cc5a
2017-04-13 12:00:08 -04:00
Renat Akhmerov
ca1009c327 Advanced publishing: add 'global' function to access global variables
Partially implements: blueprint mistral-advanced-publishing-global-vars

Change-Id: I855e325db6309ce5a426ee71ba12db2ad17f3b9e
2017-04-13 12:05:57 +07:00
Dougal Matthews
2553b2be1a Disable pbrs auto python-api generation
Mistral is a service, without a public Python API (other than the
actions api which is being moved out). Therefore including the Python
code in the documentation isn't useful. While it is present, it often
comes up in search results which will be confusing for most users.

Change-Id: Ib9d5e1a7baecf70d8e224cff470f968012317edd
2017-04-11 16:18:21 +01:00
Dougal Matthews
679fe7bbef Add a Mistral lexer for pygments
This allows us to use the following code blocks in the Mistral documentation.

    .. code-block:: mistral

When we do that the code will then be highlighted in a way specific to
Mistral, rather than the generic YAML highlighting or none.

Change-Id: Ie25725b9f803e247d23f58c4b602be938c75cfbd
2017-04-05 10:17:58 +01:00
Jenkins
b88700cc3f Merge "Remove support for py34" 2017-02-10 13:03:48 +00:00
gengchc2
3ba02abe34 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due
to the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.

Change-Id: Ic498801532227421c3247ef66eff11377df47795
2017-02-08 16:09:17 +08:00
Jenkins
1b7b969e53 Merge "Make kombu driver work in multi-thread manner" 2017-01-22 14:28:52 +00:00
Renat Akhmerov
0653e408e4 Add action "std.test_dict"
* It can be useful for various tests with big data
* Minor cosmetic changes

Change-Id: I34f568c4b7eee4485a5942fa59a1f57d735b38a7
2017-01-18 12:36:00 +07:00
Renat Akhmerov
f190b5e04b Register Javascript action additionally as 'js' action
Change-Id: I1dfc8ab2e0ce3eb576b8e57a9e4bc5ef21a084f9
2017-01-17 18:27:51 +07:00
Dawid Deja
498e69c426 Make kombu driver work in multi-thread manner
Implements blueprint mistral-kombu-driver-multi-thread

Change-Id: I08f81c7c3de47320a76dc13d5edf2186d3ef2de0
2017-01-13 17:00:43 +01:00
Jenkins
dce3be2831 Merge "Remove commented-out Apache 2 classifier from setup.cfg" 2016-12-09 08:58:36 +00:00
Ji zhaoxuan
74bca2d309 Remove commented-out Apache 2 classifier from setup.cfg
Change-Id: I64329cdec81b29209cf42720d32e0d86a04174fb
2016-12-08 09:46:01 +00:00
Michal Gershenzon
eb6c0513c6 Yaql Tasks Function
This new function will allow user to get a list of tasks matching certain
filter. For example only task in state ERROR from the current execution.

It is very useful for debugging, but also very expensive, since it might
require multiple DB queries. In addition it is important to remember a lot
of data can return from this function, so it should be used carefully

Change-Id: I452175bfb60636ed8de9b2b1ceab615359765964
Implements: blueprint yaql-tasks-function
Implements: blueprint yaql-errors-function
2016-11-30 15:49:08 +00:00
Kirill Izotov
362c2295e8 Add Jinja evaluator
Allows to use Jinja instead of or along with YAQL for expression
evaluation.

 * Improved error reporting on API endpoints. Previously, Mistral API
   tend to mute important logs related to errors during YAML parsing
   or expression evaluation. The messages were shown in the http
   response, but would not appear in logs.

 * Renamed yaql_utils to evaluation_utils and added few more tests to
   ensure evaluation functions can be safely reused between Jinja and
   YAQL evaluators.

 * Updated action_v2 example to reflect similarities between YAQL and
   Jinja syntax.

Change-Id: Ie3cf8b4a6c068948d6dc051b12a02474689cf8a8
Implements: blueprint mistral-jinga-templates
2016-10-05 11:27:29 +00: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
Renat Akhmerov
471ce2d043 Add 'uuid' YAQL function
Change-Id: I34098a72a098c460f6352344b7797edde1e604a6
2016-08-31 15:22:40 +07:00
Jenkins
0dc00b3992 Merge "Add Python 3.5 classifier and venv" 2016-07-15 09:57:02 +00:00
Roman Dobosz
606059add8 Rename package mistral.engine.rpc to mistral.engine.rpc_backend
There is a small issue during changing branch from current to Mitaka, where
there was module called rpc.py, and currently there is a package rpc. Problem
is, if Mistral from master was already at least run once, and changed back to
Mitaka, there is a chance, that directory rpc still exists, and contains pyc
files. Trying to use old rpc module will fail with unable to find
get_transport method due remains of bytecode from master branch.

Simple solution for this situation is to rename rpc module to rpc_backend.

Change-Id: Ib5d05930a9715caf2bb5ce1dba4e520a503bc0cd
2016-07-14 15:15:50 +02:00
PanFengyun
89645ce243 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I4bc6f28411b4eee1df62a845e70d24c3cfbf500e
2016-07-14 08:35:49 +08:00
Nikolay Mahotkin
fc6d712840 Make RPC implementation configurable
Partially implements blueprint mistral-alternative-rpc

Co-Authored-By: Dawid Deja <dawid.deja@intel.com>
Change-Id: I7308e75625e108b5b1395b6cfa6dc1d6321fe253
2016-07-05 11:30:02 +02:00
Xavier Hardy
72dcdfbf2a Add support for custom YAQL functions
Custom YAQL functions must be added in the 'mistral.yaql_functions'
namespace in the entry points. The entry point name is used as the
function name in YAQL. All of the Mistral YAQL functions have been
changed to a custom functions for the sake of testing.

DocImpact: The developer section in the documention has been updated.

Change-Id: I518c7a4b616089d4b70585ed85fcd81a30c93090
Implements: blueprint mistral-custom-yaql-functions
2016-07-05 10:09:04 +02:00
Dawid Deja
716776a58e Remove std.mistral_http action from tests
Unit tests should not rely on internet connection. This commit
adds new 'std.sleep' action that can symulate long running action.

Change-Id: Ib7bede239942d429d1bb1ed6f5a2611f64520848
Closes-bug: 1538996
2016-06-22 12:31:41 +02:00
Dougal Matthews
a50dcfce4e Add Python 3.4 to the classifiers
Change-Id: I908c692b1fdf4c2530de95d38070f4c6f13c4393
2016-05-24 10:38:03 +01:00
Thomas Goirand
a4c4eadbce Also package mistral_tempest_tests
With the current setup.cfg, the folder mistral_tempest_tests is not
being packaged, making it more difficult for package maintainer like
myself to run tempest tests. Please allow this change, so that I don't
have to carry such a patch in the Debian package.

Change-Id: I5c34f3516c4f171ab4f34647f1cc4a08883feacf
2016-03-25 14:24:31 +01:00
Nina Goradia
fdb24bd697 module docs are not being generated
The pbr section in setup.cfg is not defined, so the module docs are not being
generated. This causes the 404 when clicking on the ‘Module Index’ link under
the 'Indices and Tables’ section in [0].

[0] http://docs.openstack.org/developer/mistral/

Change-Id: I337e9f6e78257a3e8e9222779dfcd600ba6cebd8
Closes-bug: #1558574
2016-03-21 17:27:14 -05:00
Doug Hellmann
8a2d4b29d7 register the config generator default hook with the right name
No config generator hooks should ever be registered with a name that
belongs to another project. In this case, using oslo.middleware.cors
means that *every other project* that loads the middleware gets this
application's defaults when the generator is run on a system with
everything installed (such as a dev box with devstack). Use the name
of the app instead, to ensure that the defaults are only set when this
app's sample config and documentation are being generated.

Change-Id: I6a8c7d44b9db9325003ff2fdb667b0ced7739e96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-03-11 16:25:05 -05:00
Michael Krotscheck
54296b1519 Moved CORS middleware configuration into oslo-config-generator
The default values needed for mistral's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to the default configuration parsing. This ensures
that if a value remains unset in mistral.conf, it will be set
to use sane defaults, and that an operator modifying the
configuration file will be presented with a default set of
necessary sane headers.

Change-Id: I1174fa44f316be60fdc86a4d1032ca71c9827a25
Closes-Bug: 1551836
2016-03-10 12:25:45 -08:00
hparekh
208c4f820e Initial layout for mistral tempest plugin.
Change-Id: I1c13ebe05493d9315f9cb7c4a1b59284a8d6c50d
Partially-Implements: blueprint mistral-tempest-plugin
2015-12-24 06:11:06 +00:00
Lingxian Kong
5f714efbb5 Remove version from setup.cfg
Per [1] we now use the git repository for knowing the version instead
of modifying the setup.cfg file.

[1]
http://lists.openstack.org/pipermail/openstack-dev/2015-November/080692.html

Change-Id: Ic0c1f92bf4f2a1a63c7ac05dad6fb99d859e7493
Depends-On: I86853cebe222d5537ec46a8999961e832110314a
2015-12-03 19:50:14 +08:00
Shuquan Huang
1049328e87 OpenStack typo
change capitalization of OpenStack

Change-Id: I1b22f9a9d8797cafd0d61e6e16109d417bcb86d0
2015-11-17 10:53:48 +08:00
Jenkins
f17c6a61a5 Merge "Added home-page value with mistral docs" 2015-10-19 10:12:59 +00:00
venkatamahesh
6d2435cf81 Added home-page value with mistral docs
Change-Id: I113d75ba7f245a4c3fd986677ab83b4e7939a623
2015-10-19 14:59:42 +05:30