Commit Graph

18 Commits

Author SHA1 Message Date
Takashi Kajinami 0bba69725e Replace oslo_utils.fnmatch with fnmatch
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.

[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b

Change-Id: Ieeb0b127b25d8e95905ca4d81a636f2c2da5f05c
2021-07-08 10:32:17 +00:00
Q.hongtao 4bc6162515 Remove six library
Remove six-library Replace the following items with Python 3 style code.
- six.interger_types
- six.itervalues
- six.text_type
- six.string_types
- six.StringIO
- six.next
- six.b
- six.PY3

Change-Id: I299c90d5cbeb41be0132691265b8dcbeae65520e
2020-09-23 10:27:12 +08:00
Q.hongtao da5ac25415 Remove six.moves
Remove six.moves Replace the following items with Python 3 style code.
- six.moves.urllib
- six.moves.queue
- six.moves.range
- six.moves.http_client

Subsequent patches will replace other six usages.

Change-Id: I80c713546fcc97391c64e95ef708830632e1ef32
2020-09-22 08:34:20 +08:00
Q.hongtao aba14934e7 Remove usage of six.add_metaclass
With python 3.x, classes can use the metaclass= logic
to not require usage of the six library.

Subsequent patches will replace other six usages.

Change-Id: Iefdc99c338c7aaea18d535426c4676dbedb44f32
2020-09-19 11:37:24 +08:00
Eyal d838607b2f Add coordination support for devstack
This way we can test the service api later on gate

In order to use etcd in gate few changes were made:
* All identifiers must be byte type (group type, member id)
* Tooz has a built-in mechanizm for heartbeat no need to implement it
* Need to use eventlet monkey patch since etcd client uses blocking
  methods
* Services name must be identical to LAUNCH_OPTIONS used in cli
* Gate coordination url should be define with a schema of etcd+http
  which is the etcd gateway and works better then just etcd

Change-Id: I772651e33eada4a5c2149bfa867095c277eddeed
2019-12-25 10:38:29 +02:00
Eyal eac23d9e77 Disable the use of anchors when parsing yaml
This can be used as a DDoS attack

Closes-Bug: 1785657
Change-Id: Icf460fea113e9279715cae87df3ef88a77575e04
2019-12-17 12:08:10 +02:00
Jose Castro Leon defff08773 [Event-engine] Allow event_engine to work in HA
A previous patch allows to make multiple event_engines to listen
to a single queue, but the RPC calls on CRUD are still synchronous

This patch modifies the calls and broadcasts them on all the event
engines allow them to modify each independent listeners.

Closes-Bug: #1715848
Change-Id: Ia37831a03993f5a1bf980d62344d25377062788d
2018-10-17 16:30:17 +00:00
chenjiao 7265217e21 Amend the spelling error of a word
Amend the spelling error of a word

Change-Id: Idd701c4cf48fea1d7490cfae4b15061866531d89
2018-06-18 15:47:30 +08:00
Dougal Matthews a7314d2dd4 Fix the call to start_workflow from events triggers
See Ida361a53ffdb5426a39d276d567391d25261fb7f for a similar fix.

Closes-Bug: #1772897
Depends-On: Ifac7617decc2990ff87b76d39bf0f72a61ff2b99
Change-Id: I06304e83e3bc2fd53110daf5c829824d3614b02e
2018-06-07 10:17:13 +00:00
Jenkins bb30b1b51a Merge "Fix event-triggers workflow namespace" 2017-08-09 07:45:22 +00:00
Nikolay Mahotkin b8e16648eb [Trusts] Fix deleting trust
* Delete trust only after the last execution of
   cron-trigger or event-trigger is completed.
   Otherwise during workflow execution we get
   an error "Unauthorized error: No such trust <id>"

Closes-Bug: #1708139

Change-Id: I42849d4f7c517f8a27e0d26c9cf0d98f9c7fb94a
2017-08-04 12:22:19 +03:00
Nikolay Mahotkin cab943528f Fix event-triggers workflow namespace
Related-Bug: #1708380

Change-Id: I5b23f22790230af2e917c3b3195373e00b87f64a
2017-08-03 21:19:28 +03:00
Nikolay Mahotkin e780ffb06d [Event-triggers] Allow public triggers
* Allowed creating via API
 * Added the corresponding processing
   in the event engine
 * Corresponding test

Closes-Bug: #1704111

Change-Id: I73a1d10fe684f1ec962e42e9700064d06cb0bcbe
2017-07-26 12:21:21 +03:00
Nikolay Mahotkin c430a4620b Fix get event triggers
* Added get event triggers for all projects
   and the corresponding rule in policy.json
 * Fixed corresponding policy rule names for
   event triggers API

Change-Id: I74e65a1cee8d074cfd637e460465922b610237c5
2017-07-11 12:46:58 +03: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
Dawid Deja 5341fb2b5b Refactor rpc configuration loading
Change-Id: Ie9f996ef171939012fd4b8e74cccf4e453d74cc6
2017-01-26 11:30:35 +01:00
Spencer Yu 3b1ed4ec3e Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Iff88f55dc51981ce502d7d3e67c467242980f20c
2016-12-16 08:24:10 -08:00
Renat Akhmerov a5d284aa4f Fix launch process of Mistral components
* Fixed the bug #1622534
* Introduced MistralService class extending oslo.service.Service
  that all Mistral components running standalone should extend
* Refactored engine, executor and event engine with MistralService
* Moved most of the startup logic from launch.cmd to individual
  corresponding components
* Cluster membership is now under control of MistralService
* Fixed test_join.test_full_join_with_conditions() which previously
  had a bug and we were just 'lucky' that it passed due to a
  different work of scheduler
* Fixed a number of test cases
* Other minor changes

TODO:
* We now use many launchers (from oslo.service) to launch
  services whereas we could use just one which is recommended by
  oslo. However, we can't do that because of the api service
  that uses many workers. We'll need to look at how to refactor it
  moving forward.
* Write tests for MistralService and its derrived classes
* Address a number of TODO comments.

Closes-Bug: 1622534
Change-Id: I34ba6a8b8caf8bea17109e0f259085b373eb6d45
2016-11-30 17:42:15 +07:00