From ba7b25295b8a9878181e800e451cb1b68c3d32ef Mon Sep 17 00:00:00 2001 From: Poorna Gottimukkula Date: Tue, 4 Mar 2025 14:43:05 +0530 Subject: [PATCH] Updated ibmcloud cli commands as per latest version. Signed-off-by: Poorna Gottimukkula --- openshift-install-powervs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openshift-install-powervs b/openshift-install-powervs index df8c561..526f538 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -693,9 +693,9 @@ function powervs_login { debug_switch $CLI_PATH login --apikey "$IBMCLOUD_API_KEY" -q --no-region > /dev/null debug_switch - CRN=$($CLI_PATH pi ws ls 2>/dev/null | grep "${SERVICE_INSTANCE_ID}" | awk '{print $1}') + CRN=$($CLI_PATH pi ws ls 2>/dev/null | grep "${SERVICE_INSTANCE_ID}" | awk '{print $3}') [[ -z $CRN ]] && error "Cannot find PowerVS service instance with ID: $SERVICE_INSTANCE_ID for this account" - SVCNAME=$($CLI_PATH pi ws ls | grep "${SERVICE_INSTANCE_ID}" | awk '{$1=""; print $0}' | sed 's/^[ ]*//g') + SVCNAME=$($CLI_PATH pi ws ls | grep "${SERVICE_INSTANCE_ID}" | awk '{$NF=""; print $0}' | sed 's/^[ ]*//g') $CLI_PATH pi ws tg "$CRN" 1>/dev/null log "Targeting '$SVCNAME' with Id $CRN" } @@ -1006,7 +1006,7 @@ function variables { question "Select the Service Instance name to use:" "$ALL_SERVICE_INSTANCE" service_instance="$value" - CRN=$($CLI_PATH pi ws ls 2>/dev/null | grep "${service_instance}" | awk '{print $1}') + CRN=$($CLI_PATH pi ws ls 2>/dev/null | grep "${service_instance}" | awk '{print $3}') $CLI_PATH pi ws tg "$CRN" log "Gathering information from the selected Service Instance... Please wait"