diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2017-05-27 13:27:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-27 13:27:32 +0000 |
commit | 90760673c80a79fd5570d43fb06e0322301f7efc (patch) | |
tree | 3f0f5c453cd88ad5c7130c6fe04ec357aed3a392 | |
parent | d95569757571fcc542f4586091ec40a1ca29a6a0 (diff) | |
parent | 20064215eaea1c01fa0a6d52ace2ec420b9d9e0f (diff) |
Merge "Call python script directly in preparation & post-phase"
-rw-r--r-- | deploy/daisy_server.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/deploy/daisy_server.py b/deploy/daisy_server.py index ec30ec95..5fa09577 100644 --- a/deploy/daisy_server.py +++ b/deploy/daisy_server.py @@ -205,8 +205,9 @@ class DaisyServer(object): if self.adapter != 'libvirt': return LI('Prepare some configuration files') - cmd = 'bash {script} -n {net_file}'.format( - script=path_join(self.remote_dir, 'deploy/prepare.sh'), + cmd = 'export PYTHONPATH={python_path}; python {script} -nw {net_file}'.format( + python_path=self.remote_dir, + script=path_join(self.remote_dir, 'deploy/prepare/execute.py'), net_file=path_join(self.remote_dir, 'network.yml')) self.ssh_run(cmd) @@ -258,7 +259,8 @@ class DaisyServer(object): def post_deploy(self): LI('Post deploy ...') - cmd = 'bash {script} -n {net_file}'.format( - script=path_join(self.remote_dir, 'deploy/post.sh'), + cmd = 'export PYTHONPATH={python_path}; python {script} -nw {net_file}'.format( + python_path=self.remote_dir, + script=path_join(self.remote_dir, 'deploy/post/execute.py'), net_file=path_join(self.remote_dir, 'network.yml')) self.ssh_run(cmd, check=False) |