[openstack-dev] [mistral] Mistral Custom Actions API Design

Ryan Brady rbrady at redhat.com
Thu Mar 9 04:35:09 UTC 2017

At the PTG and previous discussions in IRC, I mentioned there were two
different design ideas I had for the developer experience for custom action
development in mistral-lib.  The purpose and intent behind the patch[1] was
discussed in person at the PTG and that was helpful for me wrt to scope.  I
feel it would be helpful to discuss and decide together the final piece of
this patch.  I'd like to get any feedback on either of these two ideas as
they will shape how developers integrate with Mistral in the future, impact
our OpenStack integration efforts in mistral-extra.  Nothing stops a
developer from adopting either style in their custom action libraries, but
most will likely want to remain consistent with style present in the
upstream code.

I have created separate declaration and usage examples in hopes of
illustrating some of the similarities and differences.  To me it seems the
base class example is more declarative/explicit, but the mixin example is
more extensible and dry.  Both examples reflect on backwards compatibility
and possible changes to how mistral checks for sync/async actions and how
to pass the context (as needed by actions that integrate with OpenStack).

base classes declaration:

base class usage:

mixins declaration:

mixins usage:



Ryan Brady
Cloud Engineering
rbrady at redhat.com

[1] https://review.openstack.org/#/c/411412/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170308/77362c52/attachment.html>

More information about the OpenStack-dev mailing list