Ask Your Question

How to invoke Inovke python program from Mistral workflow.

asked 2019-03-13 09:48:52 -0600

viswesn gravatar image

Hi All, I would like to know what way we can invoke the Python program using Mistral Workflow; I find Mistral DSL of action support for javascript but not Python; Let me know is there a way we can achieve calling the Python program via Mistral workflow.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-03-14 00:36:05 -0600

Mohit gravatar image

You can use std.ssh module to do remote ssh onto the vm and use cmd to call the python program.

ssh_to_machine_minion{{ num }}:
  action: std.ssh
    delay: 5
    count: 15
     cmd: "cd /home/stack  && python"
     host: <% $.ip_interface_list_minion{{num}} %>
     username:  <% $.username %>
     password: <% $.password %>
edit flag offensive delete link more


Thanks and this really worked!

viswesn gravatar imageviswesn ( 2019-03-14 05:00:42 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-03-13 09:48:52 -0600

Seen: 103 times

Last updated: Mar 14 '19