aboutsummaryrefslogtreecommitdiffstats
path: root/func/spawn_vm.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/spawn_vm.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/spawn_vm.py')
-rw-r--r--func/spawn_vm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/func/spawn_vm.py b/func/spawn_vm.py
index c45af00e..3a16e02d 100644
--- a/func/spawn_vm.py
+++ b/func/spawn_vm.py
@@ -65,15 +65,15 @@ class SpawnVM(Env_setup):
def heat_template_vm(self, vm_params, installer):
Heat_Dic = {}
try:
- with open('./heat/SampleHeat.yaml', 'r+') as H_temp:
+ with open('./config/SampleHeat.yaml', 'r+') as H_temp:
Heat_Dic = yaml.safe_load(H_temp)
except yaml.YAMLError as exc:
if hasattr(exc, 'problem_mark'):
mark = exc.problem_mark
- print 'Error in qtip/heat/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, mark.column + 1)
+ print 'Error in qtip/config/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, mark.column + 1)
print 'EXITING PROGRAM. Correct File and restart'
sys.exit(1)
- fopen = open('./data/QtipKey.pub', 'r')
+ fopen = open('./config/QtipKey.pub', 'r')
fopenstr = fopen.read()
fopenstr = fopenstr.rstrip()
scriptcmd = '#!/bin/bash \n echo {0} >> foo.txt \n echo {1} >> /root/.ssh/authorized_keys'.format(
@@ -243,7 +243,7 @@ class SpawnVM(Env_setup):
if i['output_key'] == 'KeyPair_PublicKey':
sshkey = str(i['output_value'])
- with open('./data/my_key.pem', 'w') as fopen:
+ with open('./config/my_key.pem', 'w') as fopen:
fopen.write(sshkey)
fopen.close()
print Env_setup.ip_pw_list