Skip to content

Commit a987e60

Browse files
author
Vijayv
committed
Fix deprecated system-pools option
Signed-off-by: Vijayv <[email protected]>
1 parent 66899c1 commit a987e60

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openshift-install-powervs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Where <args>:
5050
Environment Variables:
5151
IBMCLOUD_API_KEY IBM Cloud API key
5252
RELEASE_VER OpenShift release version (Default: 4.15)
53+
RHCOS_RELEASE_VER RHCOS Release version (Default: 9.4)
5354
ARTIFACTS_VERSION Tag or Branch name of ocp4-upi-powervs repository (Default: main)
5455
RHEL_SUBS_PASSWORD RHEL subscription password if not provided in variables
5556
NO_OF_RETRY Number of retries/attempts to run repeatable actions such as create (Default: 5)
@@ -61,6 +62,7 @@ EOF
6162
}
6263

6364
RELEASE_VER=${RELEASE_VER:-"4.15"}
65+
RHCOS_RELEASE_VER=${RHCOS_RELEASE_VER:-"9.4"}
6466
ARTIFACTS_REPO=${ARTIFACTS_REPO:-"https://github.com/ocp-power-automation/ocp4-upi-powervs"}
6567
ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"main"}
6668
#ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"release-$RELEASE_VER"}
@@ -1028,7 +1030,7 @@ function variables {
10281030
CATALOG_RHEL_IMAGES=$($CLI_PATH pi image lc --json | grep name | grep -iE 'rhel|centos' | cut -f4 -d\")
10291031
BOOT_IMAGES=$($CLI_PATH pi image ls --json | grep name | grep -vi rhcos | cut -f4 -d\")
10301032
RHEL_IMAGES="${CATALOG_RHEL_IMAGES}${IFS}${BOOT_IMAGES}"
1031-
RHCOS_IMAGES=$($CLI_PATH pi image ls --json | grep name | grep -vi rhel | grep -vi centos | grep -i "rhcos-${RELEASE_VER//.}-" | cut -f4 -d\")
1033+
RHCOS_IMAGES=$($CLI_PATH pi image ls --json | grep name | grep -vi rhel | grep -vi centos | grep -i "rhcos-${RHCOS_RELEASE_VER//.}-" | cut -f4 -d\")
10321034
[[ -z $RHCOS_IMAGES ]] && error "Cannot find RHCOS image for OCP $RELEASE_VER! Please use option '-all-images' if you have already imported the image"
10331035
fi
10341036

@@ -1049,7 +1051,7 @@ function variables {
10491051

10501052
[ -z "$ALL_OCP_VERSIONS" ] && error "No OCP versions found for version $RELEASE_VER... Ensure you have set correct RELEASE_VER"
10511053

1052-
ALL_SYSTEM_TYPES=$($CLI_PATH pi system-pools 2>/dev/null | grep "System Type" | awk '{print $3}' | sort | uniq)
1054+
ALL_SYSTEM_TYPES=$($CLI_PATH pi datacenter get ${ZONE} 2>/dev/null | grep "General" |cut -f2 -d\[ | cut -f1 -d\] | sort |sed 's/ /\n/g')
10531055
[ -z "$ALL_SYSTEM_TYPES" ] && error "Cannot find available System Types... please try again"
10541056

10551057
# TODO: Get region from a map of `zone:region` or any other good way

0 commit comments

Comments
 (0)