diff options
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 7 | ||||
-rw-r--r-- | utils/create_pod_file.py | 15 |
2 files changed, 16 insertions, 6 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index bf96fd492..418d66fb1 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -83,6 +83,8 @@ if [[ ${INSTALLER_TYPE} == compass ]]; then options="-u root -p root" elif [[ ${INSTALLER_TYPE} == fuel ]]; then options="-u root -p r00tme" +elif [[ ${INSTALLER_TYPE} == apex ]]; then + options="-u stack -k /root/.ssh/id_rsa" else echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." echo "HA test cases may not run properly." @@ -115,6 +117,11 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa fi +if [ "$INSTALLER_TYPE" == "apex" ]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + scp $ssh_options stack@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa +fi + # sdnvpn test case needs to download this image first before running echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..." wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} diff --git a/utils/create_pod_file.py b/utils/create_pod_file.py index 197e4933c..e2c57d23f 100644 --- a/utils/create_pod_file.py +++ b/utils/create_pod_file.py @@ -49,7 +49,7 @@ def get_with_passwd(): args.user, installer_pwd=args.password) -def create_file(handler): +def create_file(handler, INSTALLER_TYPE): """ Create the yaml file of nodes info. As Yardstick required, node name must be node1, node2, ... and node1 must @@ -62,27 +62,30 @@ def create_file(handler): nodes = handler.nodes node_list = [] index = 1 + user = 'root' + if INSTALLER_TYPE == 'apex': + user = 'heat-admin' for node in nodes: try: if node.roles[0].lower() == "controller": node_info = {'name': "node%s" % index, 'role': node.roles[0], - 'ip': node.ip, 'user': 'root'} + 'ip': node.ip, 'user': user} node_list.append(node_info) index += 1 except Exception: node_info = {'name': node.name, 'role': 'unknown', 'ip': node.ip, - 'user': 'root'} + 'user': user} node_list.append(node_info) for node in nodes: try: if node.roles[0].lower() == "compute": node_info = {'name': "node%s" % index, 'role': node.roles[0], - 'ip': node.ip, 'user': 'root'} + 'ip': node.ip, 'user': user} node_list.append(node_info) index += 1 except Exception: node_info = {'name': node.name, 'role': 'unknown', 'ip': node.ip, - 'user': 'root'} + 'user': user} node_list.append(node_info) if args.INSTALLER_TYPE == 'compass': for item in node_list: @@ -105,7 +108,7 @@ def main(): if not handler: print("Error: failed to get the node's handler.") return 1 - create_file(handler) + create_file(handler, args.INSTALLER_TYPE) if __name__ == '__main__': |