aboutsummaryrefslogtreecommitdiffstats
path: root/func/env_setup.py
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-10-12 15:32:52 +0800
committerwu.zhihui <wu.zhihui1@zte.com.cn>2016-10-14 17:16:00 +0800
commiteddc35b497362c0c01e612d66ed19c4d5c9dd328 (patch)
tree9a9c792a002fce40782158b9d645e597d3606f1b /func/env_setup.py
parent975e241de4d4bf3839c788ad743d0cc077e23bd4 (diff)
Adjust directory structure
qtip ! +---- scripts ! ! ! +----ref_result # python scripts to generate results report ! +----fetch_compute_ips.sh ! +----fetch_os_creds.sh ! +----file_permission.sh ! +----get_env_info.sh ! +----qtip_creds.sh ! +----ssh_exch.exp ! +---- config ! ! ! +---- Qtip_key ! +---- Qtip_key.pub ! +---- SampleHeat.yaml ! +---- utils ! ! ! +---- logger_utils.py ! +---- report # generate pdf report file Change-Id: Ia908ff31494369c1a13fb88b1ff9b0e5681f8e29 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'func/env_setup.py')
-rw-r--r--func/env_setup.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/func/env_setup.py b/func/env_setup.py
index 2655fab9..9e21a5b6 100644
--- a/func/env_setup.py
+++ b/func/env_setup.py
@@ -46,7 +46,7 @@ class Env_setup:
@staticmethod
def write_to_file(role):
- f_name_2 = open('./data/hosts', 'w')
+ f_name_2 = open('./config/hosts', 'w')
print role.items()
for k in role:
f_name_2.write('[' + k + ']\n')
@@ -62,13 +62,13 @@ class Env_setup:
os.system('ssh-keyscan %s >> /root/.ssh/known_hosts' % ip)
time.sleep(2)
- ssh_cmd = './data/qtip_creds.sh %s' % ip
+ ssh_cmd = './scripts/qtip_creds.sh %s' % ip
logger.info("run command: %s " % ssh_cmd)
os.system(ssh_cmd)
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(ip, key_filename='./data/QtipKey')
+ ssh.connect(ip, key_filename='./config/QtipKey')
for attempts in range(100):
try:
@@ -109,7 +109,7 @@ class Env_setup:
if not installer_ip:
raise RuntimeError("undefine environment variable INSTALLER_IP")
- cmd = "bash ./data/fetch_compute_ips.sh -i %s -a %s" % \
+ cmd = "bash ./scripts/fetch_compute_ips.sh -i %s -a %s" % \
(installer_type, installer_ip)
logger.info(cmd)
os.system(cmd)