Ask Your Question
0

How to invoke Inovke python program from Mistral workflow.

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

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
1

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

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
  retry:
    delay: 5
    count: 15
  input:
     cmd: "cd /home/stack  && python test_script.py"
     host: <% $.ip_interface_list_minion{{num}} %>
     username:  <% $.username %>
     password: <% $.password %>
edit flag offensive delete link more

Comments

Thanks and this really worked!

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 63 times

Last updated: Mar 14