summaryrefslogtreecommitdiffstats
path: root/deploy/common.py
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2016-06-16 10:17:04 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-16 10:17:04 +0000
commit294150c7f9e36477ff0a25f947fb2c8002999a3b (patch)
tree2e209676b32026ba2fd282eb4b7917c78049598b /deploy/common.py
parent58b6866358c503f6ac588629b705867863523e69 (diff)
parent1fc07d1d0ad750e6d1049f5b763320db2de1b396 (diff)
Merge "Introducing collection of all fuel and stack deployment logs."
Diffstat (limited to 'deploy/common.py')
-rw-r--r--deploy/common.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/deploy/common.py b/deploy/common.py
index 3cd3e0e6e..9c0f8abd1 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -77,6 +77,17 @@ def run_proc(cmd):
return process
+def run_proc_wait_terminated(process):
+ response = process.communicate()[0].strip()
+ return_code = process.returncode
+ return response, return_code
+
+
+def run_proc_kill(process):
+ response = process.kill()
+ return response
+
+
def parse(printout):
parsed_list = []
lines = printout.splitlines()
@@ -99,8 +110,10 @@ def clean(lines):
return parsed if len(parsed_list) == 1 else parsed_list
-def err(message):
+def err(message, fun = None, *args):
LOG.error('%s\n' % message)
+ if fun:
+ fun(*args)
sys.exit(1)