Licenses under which you have entitlement to use Transformation Advisor

Entitled Licenses

Product name & version License ID Link to License
IBM WebSphere Hybrid Edition 5.1 L-ZZBG-6V3K4K Review License
IBM Cloud Transformation Advisor 4.1 (Evaluation) L-HYPS-5D885S Review License
IBM Cloud Pak for Integration 2023.4.1 L-VTPK-22YZPK Review License
IBM Cloud Pak for Integration Limited Edition 2023.4.1 L-QYQF-8UFZBN Review License
IBM Cloud Pak for Applications Advanced 5.3 L-REBM-59QT8V Review License
IBM Cloud Pak for Applications Standard 5.3 L-ZUVT-EDS78A Review License
IBM Cloud Pak for Applications Limited 5.3 L-KULQ-TG6TN5 Review License
IBM WebSphere Application Server for z/OS 9.0.5 L-CTUR-CBPUER Review License
IBM Enterprise Application Runtimes 1.0 L-CNTX-G9BZZD Review License

License Usage on a Red Hat OpenShift Cluster

The following bash script can be used to retrieve license information for all the instances of Transformation Advisor on a cluster. The script can be run on RHEL or on macOS. You must be oc logged in to the cluster as an admin to run the script.

#!/bin/bash
# ---------------------------------------------
# Licensed Materials - Property of IBM
# (C) Copyright IBM Corporation 2023
# ---------------------------------------------
#
# GLOBALS
#
report_name="./ibm-transformation-advisor-license-report.txt"

# FUNCTIONS
#
# Find the date 180 days in the past
function get_180_days_ago() {
        local time_in_past_180=""
        # Check if the date command has the -j option
        if date -j >/dev/null 2>&1; then
                # Use the -j option for macOS
                time_in_past_180=$(date -j -v-180d +'%Y-%m-%d')
        else
                # Use the -d option for Linux
                time_in_past_180=$(date -d "-180 days" +%Y-%m-%d)
        fi
        # Print the Unix timestamp
        echo "${time_in_past_180}"
}

# MAIN ENTRY
time_in_past_180=$(get_180_days_ago)

# Check logged into OCP cluster
if oc whoami >/dev/null 2>&1; then
        current_user=$(oc whoami)
        current_ocp_cluster=$(oc whoami --show-server)
else
        echo "ERROR: You are not logged into an OpenShift cluster."
        echo "Please log into an OpenShift cluster as an admin user to run this report"
        exit 1
fi

# Check if report file already exists
if [[ -f ${report_name} ]]; then
        read -r -p "A file called ${report_name} already exists. Overwrite? [yes/no] " response
        case "$response" in
                [yY][eE][sS])
                echo "OK. Overwriting ${report_name}"
                rm -f ${report_name}
                ;;
                *)
                echo "Move, remove or rename ${report_name} before running this tool."
                exit 1
                ;;
        esac
fi

echo "Generating report..."
echo -n "."

# Write report header
echo "################################################################################" > $report_name
echo "# IBM Transformation Advisor License Report" >> $report_name
echo "#" >> $report_name
echo "# Time: $(date)" >> $report_name
echo "#" >> $report_name
echo "################################################################################" >> $report_name

# Write report summary
echo "" >> $report_name
echo "********************************************************************************" >> $report_name
echo "SUMMARY" >> $report_name
echo "" >> $report_name
echo "User: $current_user" >> $report_name
echo "OpenShift endpoint: $current_ocp_cluster" >> $report_name

num_instances=$(oc get transadvs.ta.ibm.com --all-namespaces --no-headers | wc -l | xargs)

if [[ ${num_instances} = 0 ]]; then
        echo "No instances of IBM Transformation Advisor were found on the cluster. All namespaces were checked" >> $report_name
        exit 0
else
        echo "Number of IBM Transformation Advisor instances installed on the cluster: ${num_instances}" >> $report_name
fi
echo -n "."

echo "" >> $report_name
echo "********************************************************************************" >> $report_name
echo "DETAILS" >> $report_name
echo "" >> $report_name

# Iterate over all the instances on the cluster
oc get transadvs.ta.ibm.com --all-namespaces -o custom-columns=NAMESPACE:.metadata.namespace --no-headers | while read -r inst_namespace; do
        echo -n "."
        namespace=${inst_namespace}
        name=$(oc get transadvs.ta.ibm.com -n ${inst_namespace} -o custom-columns=NAME:.metadata.name --no-headers)
        creation_timestamp=$(oc get transadvs.ta.ibm.com -n ${inst_namespace} -o custom-columns=CREATION:.metadata.creationTimestamp --no-headers)
        license=$(oc get transadvs.ta.ibm.com -n ${inst_namespace} -o custom-columns=LICENSE:.spec.license.aLicenseType --no-headers)
        echo "----------------------------------------" >> $report_name
        echo "Namespace: ${namespace}" >> $report_name
        echo "Instance Name: ${name}" >> $report_name
        echo "Created: ${creation_timestamp}" >> $report_name
        echo "License: ${license}" >> $report_name
        if [[ ${license} = *"Evaluation"* ]]; then
                creation_time=$(echo ${creation_timestamp} | sed "s/T.*//g")
                if [[ "${creation_time}" < "${time_in_past_180}" ]]; then
                        echo "" >> $report_name
                        echo "WARNING: This instance was created more than 180 days ago and is using an evaluation license." >> $report_name
                        echo "Please upgrade to a full license." >> $report_name
                fi
        fi
        echo "" >> $report_name
done

echo "" >> $report_name
echo "********************************************************************************" >> $report_name
echo ""
cat ${report_name}
echo "Report complete. Saved as ${report_name}"
echo ""