File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -693,9 +693,9 @@ function powervs_login {
693693 debug_switch
694694 $CLI_PATH login --apikey " $IBMCLOUD_API_KEY " -q --no-region > /dev/null
695695 debug_switch
696- CRN=$( $CLI_PATH pi ws ls 2> /dev/null | grep " ${SERVICE_INSTANCE_ID} " | awk ' {print $1 }' )
696+ CRN=$( $CLI_PATH pi ws ls 2> /dev/null | grep " ${SERVICE_INSTANCE_ID} " | awk ' {print $3 }' )
697697 [[ -z $CRN ]] && error " Cannot find PowerVS service instance with ID: $SERVICE_INSTANCE_ID for this account"
698- SVCNAME=$( $CLI_PATH pi ws ls | grep " ${SERVICE_INSTANCE_ID} " | awk ' {$1 =""; print $0}' | sed ' s/^[ ]*//g' )
698+ SVCNAME=$( $CLI_PATH pi ws ls | grep " ${SERVICE_INSTANCE_ID} " | awk ' {$NF =""; print $0}' | sed ' s/^[ ]*//g' )
699699 $CLI_PATH pi ws tg " $CRN " 1> /dev/null
700700 log " Targeting '$SVCNAME ' with Id $CRN "
701701}
@@ -1006,7 +1006,7 @@ function variables {
10061006 question " Select the Service Instance name to use:" " $ALL_SERVICE_INSTANCE "
10071007 service_instance=" $value "
10081008
1009- CRN=$( $CLI_PATH pi ws ls 2> /dev/null | grep " ${service_instance} " | awk ' {print $1 }' )
1009+ CRN=$( $CLI_PATH pi ws ls 2> /dev/null | grep " ${service_instance} " | awk ' {print $3 }' )
10101010 $CLI_PATH pi ws tg " $CRN "
10111011
10121012 log " Gathering information from the selected Service Instance... Please wait"
You can’t perform that action at this time.
0 commit comments