Re: [openstack-dev] [Mistral] Action context passed to all action executions by default

2014-12-11 Thread Renat Akhmerov
> Maybe put all these different context under a kwarg called context? > > For example, > > ctx = { > "env": {...}, > "global": {...}, > "runtime": { > "execution_id": ..., > "task_id": ..., > ... > } > } > > action = SomeMistralAction(context=ctx) IMO,

Re: [openstack-dev] [Mistral] Action context passed to all action executions by default

2014-12-11 Thread W Chan
Renat, Here's the blueprint. https://blueprints.launchpad.net/mistral/+spec/mistral-runtime-context I'm proposing to add *args and **kwargs to the __init__ methods of all actions. The action context can be passed as a dict in the kwargs. The global context and the env context can be provided her

Re: [openstack-dev] [Mistral] Action context passed to all action executions by default

2014-12-09 Thread Renat Akhmerov
Hi Winson, I think it makes perfect sense. The reason I think is mostly historical and this can be reviewed now. Can you pls file a BP and describe your suggested design on that? I mean how we need to alter interface Action etc. Thanks Renat Akhmerov @ Mirantis Inc. > On 09 Dec 2014, at 13:

[openstack-dev] [Mistral] Action context passed to all action executions by default

2014-12-08 Thread W Chan
Renat, Is there any reason why Mistral do not pass action context such as workflow ID, execution ID, task ID, and etc to all of the action executions? I think it makes a lot of sense for that information to be made available by default. The action can then decide what to do with the information.