Commit Graph

90 Commits

Author SHA1 Message Date
Takashi Kajinami 56fe735bc8 Add back wsgi script generated by setuptools
This reverts the removal of wsgi script generated by setuptools.
Directly removing the script is backword-incompatible change for any
deployment tools. The approach is still being discussed in [1]. Until
we determine the consistent solution and appropriate transition plan,
let's at least keep the existing script.

[1] https://review.opendev.org/c/openstack/governance/+/902807

Change-Id: If7e13b39f348938232177c6e1eccf0056227f5b0
2024-03-08 15:09:51 +09:00
Ghanshyam Mann fd7ea49fe8 Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: I1af648ca92c9becb64e8408558a0c3222905f318
2024-01-03 23:58:03 -08:00
Arnaud M ecdeadeb7a Change the wsgi path for devstack
Since pip 23.1, the wsgi_script from PBR are not installed anymore
(see [1])

So, instead, rely on the wsgi.py app which is directly bundled in
mistral source code.

[1] https://discuss.python.org/t/adding-support-for-wsgi-scripts-entrypoint/30905/11

Change-Id: Ideed8421427e865f8010b7bfca58c3f010ac6bd6
Signed-off-by: Arnaud M <arnaud.morin@gmail.com>
2023-11-14 20:51:51 +01:00
LeopardMa 88c7a5d1ff Update python testing as per zed cycle testing runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes and update the python
classifier for the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.htm

Change-Id: I4e27be997dc35592813d89a211bce553cd7252d3
2022-08-12 20:57:06 +09:00
songwenping 0ee7a36510 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I252f80cc3c85da0ecd872397109dd9e35406f2a3
2021-04-30 01:57:12 +00:00
Ghanshyam Mann 7cf2014c2e [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I3b9aeb3379a76f7e40dab0c46e27f4447a0c3d03
2020-12-22 16:47:46 +07:00
ali 9be4f8e119 created a new Api endpoints and added dynamic actions
* added dynamic actions:
     these actions are created and modified in runtime,
     each action needs a code source to be imported from and a
     class name.

 - there are 2 new endpoints:
    - /v2/code_sources/:
       used to add new code sources to mistral.
    - /v2/dynamic_actions/:
      used to add dynamic actions to mistral in runtime

 - a new Action provider (DynamicActionProvider) was added:
    it provides the actions created from the dynamic actions api.

Change-Id: I9fe8c28ffdef71016d9dc13aea60a288c8ebaa0a
Signed-off-by: ali <ali.abdelal@nokia.com>
2020-11-18 10:15:26 +00:00
Renat Akhmerov 06a0f33476 Refactor Mistral with Action Providers
* This patch refactors Mistral with the action provider concept
  that is responsible for delivering actions to the system. So
  it takes all the burden of managing action definitions w/o
  having to spread that across multiple subsystems like Engine
  and API and w/o having to assume that action definitions are
  always stored in DB.
* Added LegacyActionProvider  that represents the old way of
  delivering action definitions to the system. It pretty much just
  analyses what entries are configured in the entry point
  "mistral.actions" in setup.cfg and build a collection of
  corresponding Python action classes in memory accessible by names.
* The module mistral/services/actions.py is now renamed to
  adhoc_actions.py because it's effectively responsible only for
  ad-hoc actions (those defined in YAML).
* Added the new entry point in setup.cfg "mistral.action.providers"
  to register action provider classes
* Added the module mistral/services/actions.py that will be a facade
  for action providers. Engine and other subsystems will need to
  work with it.
* Other small code changes.

Depends-On: I13033253d5098655a001135c8702d1b1d13e76d4
Depends-On: Ic9108c9293731b3576081c75f2786e1156ba0ccd
Change-Id: I8e826657acb12bbd705668180f7a3305e1e597e2
2020-09-24 11:10:33 +00:00
Sean McGinnis 3eef103b0c
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: Id140764a69f443d3f7e9f69ef71601f1a694fddb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:22:36 -05:00
Renat Akhmerov 592981f487 Refactor expressions
* This patch moves code related to YAQL and Jinja into their
  specific modules so that there isn't any module that works with
  both. It makes it easier to understand how code related to one
  of these technologies works.
* Custome built-in functions for YAQL and Jinja are now in a
  separate module. It's easier now to see what's related with
  the expression framework now and what's with integration part,
  i.e. functions themselves.
* Renamed the base module of expressions similar to other packages.
* Other style changes.

Change-Id: I94f57a6534b9c10e202205dfae4d039296c26407
2020-02-26 12:36:34 +07:00
Ghanshyam Mann fa2042a821 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Mistral is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ica51b3b36f3784b4b04731406b6bf8320d5de4b8
2019-11-16 14:07:57 +00:00
Eyal 6098804a5b remove mistral-tempest-plugin from setup.cfg
mistral-tempest-plugin is not part of mistral anymore
remove this from the packages section in setup.cfg

Change-Id: If2c706ee66bb1ef6fc602a0878da55d67b097ad1
2019-07-21 07:52:36 +03:00
Renat Akhmerov 43d23c0e25 Create needed infrastructure to switch scheduler implementations
* After this patch we can switch scheduler implementations in the
  configuration. All functionality related to scheduling jobs is
  now expressed vi the internal API classes Scheduler and
  SchedulerJob. Patch also adds another entry point into setup.cfg
  where we can register a new scheduler implementation.
* The new scheduler (which is now called DefaultScheduler) still
  should be considered experimental and requires a lot of testing
  and optimisations.
* Fixed and refactored "with-items" tests. Before the patch they
  were breaking the "black box" testing principle and relied on
  on some either purely implementation or volatile data (e.g.
  checks of the internal 'capacity' property)
* Fixed all other relevant tests.

Change-Id: I340f886615d416a1db08e4516f825d200f76860d
2019-06-24 11:25:57 +03:00
pengyuesheng 2a1063e7d4 Add python 3.7 classifier to setup.cfg
Change-Id: I6207b11defb4b9164b3213b5a43a868f1ae21f34
2019-06-11 09:16:20 +08:00
Ghanshyam Mann c5808e54e0 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I182dbda3e602e15bac229518e3e0704f7ee6a4c9
2019-04-14 23:32:08 +00:00
yfzhao 98589e12c9 Update mailinglist from dev to discuss
openstack-dev was decomissioned this night in https://review.openstack.org/621258
Update openstack-dev to openstack-discuss

Change-Id: I803a5acabe8ccdf18721707f5637d759d9b3d5b6
Closes-Bug: #1808899
2019-01-04 14:59:24 +00:00
Bob Haddleton e0522a33db Add Python 3.6 classifier to setup.cfg
Change-Id: I2bc6b4832eb1313c36aac8516a3dffcdb7a4b7c8
2018-11-22 06:33:24 +00:00
Lance Bragstad 5e3cdec918 Add entry point to allow for oslo.policy CLI usage
The oslo.policy library exposes entry points so that users can
generate sample policy files and templates. The entry points do
expect some things to be done by the service in order to work,
though.

This commit adds an entry point for oslo.policy so that it can
consume an enforcer that has been initialized with mistrals
policies. The library will use this to generate useful things
for users like templates and sample policy files.

Change-Id: Ib442fbb79b5c237d634586c3169cf8c7f595da1c
Closes-Bug: 1793346
2018-09-19 16:25:33 +00:00
Nguyen Van Trung 69d34b2e85 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more details information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I4dd494a46011aa8547f52b442f9cba4d402fb91a
2018-07-09 14:54:23 +07:00
Vitalii Solodilov 5f89e2e71f Added JavaScript evaluator which doesn't require a compilation
* Added new JavaScript evaluator py_mini_racer. Advantages:
    * is distributed as wheel package
    * supports differences platforms
    * live project
* BUILD_V8EVAL was removed because it was replaced by py_mini_racer in
Mistral Docker image
* Added stevedore integration to javascript evaluators
* Refreshed javascript tests. Add test for py_mini_racer evaluator
* Install py_mini_racer library in during mistral test
* Refreshed javascript action doc

Change-Id: Id9d558b9b8374a2c2639e10cb1868f4e67f96e86
Implements: blueprint mistral-add-py-mini-racer-javascript-evaluator
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-04-23 17:04:18 +00:00
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