Created
August 5, 2016 10:35
-
-
Save Kami/b4f06f94a8fddd7f8dc9b03b69a8e95a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from st2actions.runners.pythonrunner import Action | |
class MyEchoAction(Action): | |
def run(self, message): | |
print(message) | |
if message == 'working' | |
# If value "working" is passed for parameter "message", action status will | |
# succeed (first item in the tuple indicates success - success flag is True) | |
return (True, message) | |
# If any other value is passed in for parameter "message", action will fail (second | |
# item in the tuple indicates failure - success flag is False) | |
return (False, message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment