2857 Commits

Author SHA1 Message Date
Michal Gershenzon
7f03d9fa60 Fixing indentation in docs
One example has bad indentation.

Change-Id: I52dbbe714ba8fc56f25350d937a8925e1cfe1357
2017-05-30 10:48:54 +00:00
Jenkins
a64625a70b Merge "Fix doc generation for python 3" 2017-05-24 08:02:55 +00:00
OpenStack Proposal Bot
c5db3bc014 Updated from global requirements
Change-Id: Ibcaceaaa1f66cbdbf2dcd8336b68702ec251a063
2017-05-24 03:38:11 +00:00
Sharat Sharma
daf75c2852 Fix doc generation for python 3
The html_last_updated_fmt option is interpeted as a byte string in
python3, make it utf-8 string.

Change-Id: I7ba038ea1bca354681f973d68c06eb3c4bfa6e29
2017-05-23 14:38:54 +00:00
Jenkins
c3a576e090 Merge "[Regions] Fixing determining keystone for actions" 2017-05-23 12:55:09 +00:00
Jenkins
1a8f8112a8 Merge "Propagate "evaluate_env" workflow parameter to subworkflows" 2017-05-23 09:38:03 +00:00
Jenkins
076224408a Merge "Add one more test for task() function used in on-success" 2017-05-23 09:36:53 +00:00
Renat Akhmerov
deb01bb800 Propagate "evaluate_env" workflow parameter to subworkflows
Change-Id: I6deafd8d71172faf74553a9a741753b7035725df
2017-05-23 10:12:10 +07:00
Jenkins
d71b48d40a Merge "Add 'runtime_context' to task execution REST resource" 2017-05-22 15:00:19 +00:00
Jenkins
81c51cb483 Merge "Add 'triggered_by' into task execution runtime context" 2017-05-22 15:00:08 +00:00
Nikolay Mahotkin
0f450d38dd [Regions] Fixing determining keystone for actions
* With default region, it was not possible
 to correctly determine keystone endpoint
 for a set of actions: nova, mistral etc.
 because they use the same default region
 for keystone endpoint if none provided.
 Keystone endpoint should rather be gotten
 using keystone_authtoken.region_name config
 option.

 Note: fix does not affect keystone actions.
 Keystone actions use auth_uri from context as
 an endpoint.

Change-Id: I8abd59790d4bf60ed71ae3100492b782c35ad6ce
2017-05-22 15:00:07 +03:00
Renat Akhmerov
754f47d384 Add one more test for task() function used in on-success
Change-Id: Ibccb8b49b967920fd4a658f589a91ec3a4ea632c
2017-05-22 10:11:14 +00:00
Renat Akhmerov
cba6b493f2 Add 'runtime_context' to task execution REST resource
Partially implements: blueprint mistral-previous-tasks

Change-Id: I8aacadd69b6991bbd09aab0226d2c001bbe43085
2017-05-22 17:06:01 +07:00
Renat Akhmerov
9c5dacf429 Add 'triggered_by' into task execution runtime context
* Added 'triggered_by' into 'runtime_context' of task execution
  in the form:
  [
    {
      'task_id': '123-123-123',
      'event': 'on-success'
    },
    ...
  ]
  This allows to do backtracking of task execution history, i.e.
  we can see what task and on what event initiated the run of the
  given task.
* Minor style changes.

TODO:
 * Support 'join' task use case
 * Add 'runtime_context' into task execution REST resource

Change-Id: I20e5d0d282527ea7996ff5f84eb11bc9c6e843fe
Partially implements: blueprint mistral-previous-tasks
2017-05-22 17:05:41 +07:00
Renat Akhmerov
e9dd776d98 Refactor rest_utils
* Method rest_utils.get_all() was not composed efficiently enough.
  It applied 'resource_function' to potentially load additional
  fields even if only specific fields were requested by a user.
  This patch fixes this by splitting the whole logic of the method
  into cases when specific fields are requested and when they are
  not.
* Added the method from_tuples() to rest resources to optimize
  loading of db objects in case if only specific fields are
  requested. Method from_dict() and from_db_model() are now
  based on it.

Change-Id: I318c07f0c86e8aec404ae2357c3c10bf3ca6bed3
2017-05-22 12:03:55 +07:00
Renat Akhmerov
289273235d Optimize API layer: using from_db_model() instead of from_dict()
* Using method from_db_model() of REST resources where possible
  which is more efficient than from_dict() that requires one more
  object in memory (a dict)
* Minor style changes

Change-Id: Ie1f3137bee94328f2af676a0831e30c1cf212f47
2017-05-22 12:03:17 +07:00
Jenkins
894e0a3a25 Merge "Adding mistral_lib actions to mistral" 2017-05-22 04:39:11 +00:00
Jenkins
27c16817d7 Merge "Get rid of ambiguity in region_name" 2017-05-20 11:24:30 +00:00
Jenkins
6ae4e10860 Merge "Update AdHoc Actions to support context data references" 2017-05-19 16:03:39 +00:00
Nikolay Mahotkin
c3050df5ac Get rid of ambiguity in region_name
Now keystone_authtoken.region_name is used
 both for requesting admin keystone endpoint
 and default region for openstack actions.
 Default region doesn't work for environments
 with keystone in 1 region and mistrals in many
 regions.

 Due to above just specifying default_region name
 separately for openstack actions can solve the problem

Closes-Bug: #1691660

Change-Id: I1eeea298feca45de37d77d791e1548ec5e7161a1
2017-05-19 17:22:01 +03:00
Jenkins
2ab9da618b Merge "Update Docker README" 2017-05-18 11:41:49 +00:00
Jenkins
6e58c15187 Merge "Refactor db model methods" 2017-05-18 11:03:57 +00:00
Bob Haddleton
a121aacbbc Update AdHoc Actions to support context data references
AdHoc actions can be defined using YAQL and Jinja2 expressions in the
same way as Tasks, but they could not access the associated context
data because the context was not available when the expression is
evaluated.  This patchset passes the task and workflow context into
the AdHocAction object so that the inputs can be evaluated using the
available context, and the context data will be available for
reference.

Added a test to verify that the env() works in AdHoc Actions.

Change-Id: Ib95604d3d494a443e852bc7f5eee24f398b1648c
Closes-Bug: 1690158
2017-05-17 22:09:29 -05:00
Adriano Petrich
a4fa5ba0f9 Adding mistral_lib actions to mistral
This deprecates the mistral.actions.base:Action in favor of
mistral_lib.actions:Action

Change-Id: I3dedb6474922c341088a12696f3f5c418594847b
2017-05-17 17:59:38 +01:00
Ryan Brady
67d9758162 Update Docker README
This patch updates the docker README file to include the --link arg
to the command for launching a Mistral container to ensure the
rabbitmq and mistral containers can communicate.

This patch also adds a new section that explains how and why to
mount the Mistral source code as a volume in a running container.

Change-Id: Iec25f7e7dfda0bc8c9b38fa37b048448d73f66e4
Co-Authored-By: Brad Crochet <brad@redhat.com>
2017-05-17 12:07:49 -04:00
OpenStack Proposal Bot
8eb934739a Updated from global requirements
Change-Id: I80ce3bd0ca3a79b1b2e2654e012b3466c95731f3
2017-05-17 13:41:29 +00:00
Renat Akhmerov
6a2e90f7f7 Refactor db model methods
* This is a preparation for optimizing API layer. We need to
  get rid of redundant data coversions like "db model -> dict ->
  REST resource". We can do directly "db model -> REST resource".
  To do that, db models need to have a method that returns
  column values w/o creating a dictionary.

Change-Id: I89c78fdce256249286903c4e2c8bef2a5bf63af7
2017-05-17 12:15:20 +07:00
OpenStack Proposal Bot
1f9db4cd52 Updated from global requirements
Change-Id: If083e24215a852db740b673967fbeaefc8140a7f
2017-05-17 03:50:04 +00:00
Jenkins
615d54030f Merge "Add release note for "action_region" support" 2017-05-16 15:03:34 +00:00
Jenkins
8ae2213ab3 Merge "Remove unused logging import" 2017-05-16 15:03:28 +00:00
Lingxian Kong
9b0cba60b3 Add release note for "action_region" support
Change-Id: I1b56e6d265b4e0b02d90142cbf157fa6e274f34d
2017-05-16 22:13:28 +12:00
Jenkins
5a10c521d5 Merge "Adding log to db_sync" 2017-05-16 09:04:29 +00:00
Jenkins
fd287d29ca Merge "Add "action_region" param for OpenStack actions" 2017-05-16 07:36:23 +00: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
Lingxian Kong
8b6147d076 Add "action_region" param for OpenStack actions
A new config item 'modules-support-region' is introduced to be used by
cloud operators, mistral will decide if add 'action_region' param to
openstack service action inputs according to that config.

Fixed an action definition for tempest tests.

TODO: Add release note.

Implements: blueprint mistral-multi-region-support

Change-Id: I0b582e9f81ab72cd05f4fae592c568f38dec6e00
2017-05-16 14:06:56 +12:00
Jenkins
01281e1807 Merge "Release notes for "evaluate_env"" 2017-05-15 07:10:44 +00:00
Jenkins
1c00893c16 Merge "Add 'evaluate_env' workflow parameter" 2017-05-15 07:10:38 +00:00
Jenkins
4c48162816 Merge "Add hide_args=True to @profiler.trace() where it may cause problems" 2017-05-15 07:07:12 +00:00
OpenStack Proposal Bot
7375853e90 Updated from global requirements
Change-Id: I12a1dfeb82b21e96d755e8def0c6f0b6fc005b3f
2017-05-15 00:46:30 +00:00
Renat Akhmerov
0415a7c44b Release notes for "evaluate_env"
Change-Id: I9a164e317d3a50a2ddb42e5b20c7c2c7bdaf679f
2017-05-12 16:13:37 +07:00
Renat Akhmerov
aa1790ca74 Add 'evaluate_env' workflow parameter
* This parameter, if set to False, prevents from evaluating
  expressions in a workflow environment. By default, it's set to
  True for backwards compatibility. In some cases, it guarantees
  safety from blowing size of the evaluated objects (e.g. if
  there are expressions in it like <% $ %> and <% env() %>). Or
  if we simply don't want to evaluate it because we want to have
  a text in the environment containing expressions as informative.

Change-Id: I116004e9e2d0269fc69e39b552165f6e0720148a
Closes-Bug: #1690319
2017-05-12 16:13:33 +07:00
Renat Akhmerov
2c6737b74c Add hide_args=True to @profiler.trace() where it may cause problems
* Without hide_args=True parameter @profiler.trace() works much
  slower because it gets string representation of decorated method
  parameters internally. Adding it slightly improves performance.

Change-Id: I75a8fecd2e37b1d25c6f70501711e709c2d2ae25
2017-05-12 15:22:46 +07:00
Sharat Sharma
7664c5d2a1 Remove unused logging import
Change-Id: I6205e7d49277871323f1ff937bd62a14a5e0a788
2017-05-11 11:45:13 +00: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
Emilien Macchi
2a2c8e733b Revert "Support transition to keystone auth plugin"
This patch broke Ironic introspection workflow:
https://bugs.launchpad.net/tripleo/+bug/1688767

This reverts commit 1c485867c456df32cf0401a47d177b2478a51313.
Related-Bug: #1688767

Change-Id: I86d4b40e19b3b0b3cfe0d30e2c5a588e29af6d98
2017-05-09 13:02:12 +00:00
Jenkins
bffc72df4a Merge "Force Python 2 for pep8 linting" 2017-05-07 13:38:59 +00:00
Boris Bobrov
074a04ad6d Change service name to workflowv2 in docs
Today we use workflowv2 instead of workflow. Clients and puppets expect
it.

Change-Id: Id2994db9bbb2b1440bd9c92706dbd1ff6616569b
Closes-Bug: 1688219
2017-05-05 11:11:54 +00:00
Brad P. Crochet
1c485867c4 Support transition to keystone auth plugin
The puppet module puppet-mistral is moving to use a proper keystone
authtoken module. This supports that transition. A follow on patch
will remove the transition code.

Change-Id: Ief32ae01372c8c8d32fc5e2c89a2927510983a5b
2017-05-04 17:40:55 -04:00
chenaidong1
97e2d359b6 Fix a typo
Change-Id: I64e8a5ca2ac3dd79ab9a8e4199aeea344f43226f
2017-05-04 16:48:43 +08:00
Jenkins
f3bcd58a37 Merge "Add support for mistral-lib to Mistral" 2017-05-03 04:40:48 +00:00