aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-09 21:48:35 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-09 21:48:35 +0000
commit097a6e66c3ff19aa53ef3a72dce3a2e41c4eb9ed (patch)
tree71d2799f07d8125002eb449adbbaed88695a0a52 /ms
parent20f27d87bb4ce6343ec2ce54a5cebf1681fac8be (diff)
parent884c6b10720dbfc08a442f0693a994f9abd1bd57 (diff)
Merge "Add dynamic-properties as python script arg"
Diffstat (limited to 'ms')
-rw-r--r--ms/command-executor/src/main/python/command_executor_handler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ms/command-executor/src/main/python/command_executor_handler.py b/ms/command-executor/src/main/python/command_executor_handler.py
index 305c83e17..972dad627 100644
--- a/ms/command-executor/src/main/python/command_executor_handler.py
+++ b/ms/command-executor/src/main/python/command_executor_handler.py
@@ -15,11 +15,12 @@
#
from builtins import Exception, open, dict
from subprocess import CalledProcessError, PIPE
+from google.protobuf.json_format import MessageToJson
import logging
import os
+import re
import subprocess
-import sys
import virtualenv
import venv
import utils
@@ -72,9 +73,8 @@ class CommandExecutorHandler():
if "ansible-playbook" in request.command:
cmd = cmd + "; " + request.command + " -e 'ansible_python_interpreter=" + self.venv_home + "/bin/python'"
else:
- cmd = cmd + "; " + request.command
+ cmd = cmd + "; " + request.command + " " + re.escape(MessageToJson(request.properties))
- self.logger.info("Command: {}".format(cmd))
try:
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=True, bufsize=1, universal_newlines=True) as newProcess: