summaryrefslogtreecommitdiffstats
path: root/fuel/deploy/deploy.py
diff options
context:
space:
mode:
authorSzilard Cserey <szilard.cserey@ericsson.com>2015-06-18 11:32:57 +0200
committerSzilard Cserey <szilard.cserey@ericsson.com>2015-06-18 13:29:46 +0200
commit49b17cd12b10327ca8848c37746768aa6c804827 (patch)
tree474dd7201c71b7a54086250c1c40adfe10d41f34 /fuel/deploy/deploy.py
parentc52a2ce8490535fe839a47b46eb42c458d39106a (diff)
Catching exit status from remote deployment process
JIRA: [BGS-2] Create Fuel deployment script Change-Id: I21997df2534ef3cb0ae9ed47a01e6625b8404af9 Signed-off-by: Szilard Cserey <szilard.cserey@ericsson.com>
Diffstat (limited to 'fuel/deploy/deploy.py')
-rw-r--r--fuel/deploy/deploy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/fuel/deploy/deploy.py b/fuel/deploy/deploy.py
index 3305aed..402d0f2 100644
--- a/fuel/deploy/deploy.py
+++ b/fuel/deploy/deploy.py
@@ -2,6 +2,7 @@ import os
import shutil
import io
import re
+import sys
import netaddr
import uuid
import yaml
@@ -138,7 +139,7 @@ class AutoDeploy(object):
def deploy_env(self):
dep = CloudDeploy(self.dha, self.fuel_conf['ip'], self.fuel_username,
self.fuel_password, self.dea_file, WORK_DIR)
- dep.deploy()
+ return dep.deploy()
def setup_execution_environment(self):
exec_env = ExecutionEnvironment(self.storage_dir, self.pxe_bridge,
@@ -157,7 +158,7 @@ class AutoDeploy(object):
self.create_tmp_dir()
self.install_fuel_master()
shutil.rmtree(self.tmp_dir)
- self.deploy_env()
+ return self.deploy_env()
def check_bridge(pxe_bridge, dha_path):
with io.open(dha_path) as yaml_file:
@@ -215,7 +216,7 @@ def main():
d = AutoDeploy(without_fuel, storage_dir, pxe_bridge, iso_file,
dea_file, dha_file)
- d.deploy()
+ sys.exit(d.deploy())
if __name__ == '__main__':
main() \ No newline at end of file