Skip to content

Commit

Permalink
Merge pull request #301 from clcollins/fix_cluster_name_search
Browse files Browse the repository at this point in the history
Add 'name' parameter for OCM cluster search
  • Loading branch information
openshift-merge-bot[bot] authored Aug 15, 2024
2 parents 2d9e91d + 05a01eb commit 1fd10ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/bashrc.d/06-sre-login-libs.bashrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# shellcheck shell=bash

function cluster_info_env_export(){
SEARCH_STRING="id like '$INITIAL_CLUSTER_LOGIN' or external_id like '$INITIAL_CLUSTER_LOGIN' or display_name like '$INITIAL_CLUSTER_LOGIN'"
SEARCH_STRING="id like '$INITIAL_CLUSTER_LOGIN' or external_id like '$INITIAL_CLUSTER_LOGIN' or name like '$INITIAL_CLUSTER_LOGIN' or display_name like '$INITIAL_CLUSTER_LOGIN'"
cluster_details=$(ocm list clusters --parameter=search="(($SEARCH_STRING))" --columns "id, external_id, name" --no-headers)
CLUSTER_ID=$(awk '{print $1}' <<< $cluster_details)
CLUSTER_UUID=$(awk '{print $2}' <<< $cluster_details)
Expand Down

0 comments on commit 1fd10ef

Please sign in to comment.