Commit Graph

13 Commits

Author SHA1 Message Date
Eyal 8bdf341af7 Remove OpenStack actions from mistral
Depends-on: https://review.opendev.org/#/c/703296/
Depends-On: https://review.opendev.org/#/c/704280/
Change-Id: Id62fdabe7699e7c3b2977166e253cfc77779e467
2020-02-26 10:12:01 +02:00
Adriano Petrich 4c53234e27 Adding log to db_sync
if called by mistral-db-manage it will log info level
    to /var/log/mistral/mistral-db-manage

Included some debug level logging also for main actions.

Change-Id: I0574b38efcc0dd7485953bf3089ff0a5a3ef6394
Closes-Bug: #1689821
2017-05-16 05:17:08 +00:00
Istvan Imre 91237c2baa External OpenStack action mapping file support
Release note and command line parameter added.
From now it is optional to list openstack modules in mapping file which
you would not include into supported action set.

Change-Id: I5ab01395c507fc857dca7cf08ab344a07def0dcf
2017-03-03 08:00:30 +00:00
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
Juan Antonio Osorio Robles 81f16827e3 Use actual session for ironic-inspector action population
python-ironic-inspector needs an actual session when creating the
client, since it will try to fetch and furtherly validate the given
version regardless if a version is explicitly given. This fetching
and validation do calls to keystone which require credentials. Thus,
I'm using mistral's service credentials to fetch the required info.

Change-Id: I908552d2fb8ab4a5a3593f03f92ee6a31b672034
2016-08-05 08:13:55 +03:00
caoyue 2d58a9fd7e Remove unused logging import
it's obviously the code was copied from other place,
let's make it perfect.

Change-Id: Iebac30fe1240fe0c1f2849120e9566397ec73538
2016-01-15 12:42:47 +08:00
Dan Prince 97aaaa5c42 Run pep8 on some tools python files
Running pep8 on some of the python files in tools/ would
be useful/helpful during development.

Change-Id: I10e7cf7ca448e7498482bae90aa2255507413fce
2015-12-03 08:42:38 -05:00
Nikolay Mahotkin d66d728dfe Fixing import error in sync_db.py
Closes-Bug: #1477092

Change-Id: I6cd9df2adca7f99ee6fdbaf396800001aed650ac
2015-07-22 14:25:05 +03:00
LingxianKong a674853d62 Make use of graduated oslo.log module
* use oslo.log for logging functionality
* get rid of the file /mistral/openstack/common/log.py

Implements: blueprint mistral-log-enhancement
Partial-Bug: #1459188

Change-Id: I6b62cffda0a20b6caf59cc30bcc33c21ae1e5898
2015-06-09 17:38:19 +08:00
Nikolay Mahotkin bb5d09b0e3 Create standard workflows and actions
* Standard workflows are creating during sync_db.sh
 * Standard workflows include:
     - std.create_instance
     - std.delete_instance
     (list will be extended in future)
 * Standard actions:
     - std.wait_ssh (needed for std.create_instance)
 * Make it possible to see these workflows from any project (global scope)
 * Small changes in sqlalchemy api and workflows_service

Partially implements blueprint mistral-multitenancy

Change-Id: I8a8ace40949b2b711a292aac94d7e6354d1dff9c
2014-10-10 12:46:40 +04:00
Nikolay Mahotkin 9c6fe87129 Add check on config file in sync_db script
Change-Id: Id8ce0ea35dd6bf05caca2e5133c855157e11c828
2014-09-11 13:25:46 +04:00
Nikolay Mahotkin 8d08152f33 Rename action_factory to action_manager
* action_factory is renamed to action_manager and
   is moved to services

Change-Id: Ib09e80809326c4006b4f97f06ff323c2fd664867
2014-09-05 15:32:15 +04:00
Nikolay Mahotkin c5d442e6e4 Modify action_factory to store actions in DB
* Action factory register actions in DB at starting
 * Added script tools/sync_db.sh for sync with db
   (Updates system actions, it is required before
   first Mistral launch)
 * Changed init Mistral in devstack: we must do
   sync_db before the launching.

 * Since we have to write all actions in DB, unit
   test are also modified:
    * Now in tearDown() we don't drop db at all,
      but just delete all things except Actions.
    * Created heavy_init() method as a replacement
      setUpClass(), see comments in tests/base.py
    * Register actions operation is too much expensive
      operation so we create db and init actions in
      heavy_init() method.

TODO:
 * Provide executor info to construct action class in
   runtime using action_factory
 * Modify/write an instruction 'How to start Mistral'

Change-Id: If4416c4da5c05189126c109aa613a0303c1b7ef0
2014-09-05 15:32:12 +04:00