X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ffetch_os_creds.sh;h=6a382a56c624bebe9ffa2cc97dbc998949e357fa;hb=f1415796efec4984962f9817639a5ff2cd9ecd41;hp=856f69a271e1e9e2112bf2645fc3e19a81b31fc7;hpb=f90d4504715541e61f9da8a2a20c5ee818322e1d;p=releng.git diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 856f69a27..6a382a56c 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -121,6 +121,14 @@ if [ "$installer_type" == "fuel" ]; then # but sometimes the output of endpoint-list is like this: http://172.30.9.70:8004/v1/%(tenant_id)s # Fuel virtual need a fix + #convert to v3 URL + auth_url=$(cat $dest_path|grep AUTH_URL) + if [[ -z `echo $auth_url |grep v3` ]]; then + auth_url=$(echo $auth_url |sed "s|'$|v3&|") + fi + sed -i '/AUTH_URL/d' $dest_path + echo $auth_url >> $dest_path + elif [ "$installer_type" == "apex" ]; then verify_connectivity $installer_ip @@ -130,13 +138,13 @@ elif [ "$installer_type" == "apex" ]; then if [ -f /root/.ssh/id_rsa ]; then chmod 600 /root/.ssh/id_rsa fi - sudo scp $ssh_options root@$installer_ip:/home/stack/overcloudrc $dest_path + sudo scp $ssh_options root@$installer_ip:/home/stack/overcloudrc.v3 $dest_path elif [ "$installer_type" == "compass" ]; then verify_connectivity $installer_ip controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ 'mysql -ucompass -pcompass -Dcompass -e"select * from cluster;"' \ - | awk -F"," '{for(i=1;i /dev/null +elif [ "$installer_type" == "daisy" ]; then + verify_connectivity $installer_ip + cluster=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ + "source ~/daisyrc_admin; daisy cluster-list"|grep active|head -1|awk -F "|" '{print $3}') &> /dev/null + if [ -z $cluster ]; then + echo "No active cluster detected in daisy" + exit 1 + fi + + sshpass -p r00tme scp 2>/dev/null $ssh_options root@${installer_ip}:/etc/kolla/admin-openrc.sh $dest_path &> /dev/null + else error "Installer $installer is not supported by this script" fi