Adding support for native python actions. Issue #16
Fix hello python sample action to fit the same pattern as the js and swift actions.
diff --git a/tools/cli/wskaction.py b/tools/cli/wskaction.py
index e0a6226..f9f4219 100644
--- a/tools/cli/wskaction.py
+++ b/tools/cli/wskaction.py
@@ -156,6 +156,7 @@
# where initializer is optional, or:
# { kind: "blackbox", image: "docker image" }, or:
# { kind: "swift", code: "swift code" }, or:
+ # { kind: "python", code: "python code" }, or:
# { kind: "java", jar: "base64-encoded JAR", main: "FQN of main class" }
def getExec(self, args, props):
exe = {}
@@ -173,6 +174,9 @@
if args.artifact.endswith('.swift'):
exe['kind'] = 'swift'
exe['code'] = contents
+ elif args.artifact.endswith('.py'):
+ exe['kind'] = 'python'
+ exe['code'] = contents
elif args.artifact.endswith('.jar'):
exe['kind'] = 'java'
exe['jar'] = base64.b64encode(contents)