|
5 | 5 | import os
|
6 | 6 |
|
7 | 7 | #
|
8 |
| -# This program verifies that bean attr values are expected values. |
| 8 | +# This program verifies that bean attr values are expected values, |
| 9 | +# it can be used to demonstrate situational config overrides. |
9 | 10 | #
|
10 | 11 | # Usage:
|
11 | 12 | #
|
|
28 | 29 | # The program exits with a non-zero exit code on any failure
|
29 | 30 | # (including an unexpected attribute value).
|
30 | 31 | #
|
31 |
| -# |
| 32 | +# Sample usage in an Operator k8s WL pod: |
| 33 | +# Assumptions: |
| 34 | +# Assumes a configuration with 'admin-server' listen-address of localhost, and |
| 35 | +# 'managed-server1' listen-address of localhost, and assumes that these have |
| 36 | +# been overridden by sit-cfg to be 'domain1-admin-server' and |
| 37 | +# 'domain1-managed-server1' respectively. |
| 38 | +# |
| 39 | +# test_home=/tmp/introspect |
| 40 | +# mypod=domain1-admin-server |
| 41 | +# infile=$test_home/checkBeans.input |
| 42 | +# outfile=$test_home/checkBeans.output |
| 43 | +# myns=default |
| 44 | +# url=t3://domain1-admin-server:7001 |
| 45 | +# username=weblogic |
| 46 | +# password=welcome1 |
| 47 | +# |
| 48 | +# echo "Info: Checking beans to see if sit-cfg took effect. Input file '$infile', output file '$outfile'." |
| 49 | +# |
| 50 | +# mkdir $test_home |
| 51 | +# echo '/Servers/admin-server,ListenAddress,localhost,domain1-admin-server' > $infile |
| 52 | +# echo '/Servers/managed-server1,ListenAddress,localhost,domain1-managed-server1' >> $infile |
| 53 | +# |
| 54 | +# kubectl -n $myns cp $infile $mypod:/shared/checkBeans.input || exit 1 |
| 55 | +# kubectl -n $myns cp checkBeans.py $mypod:/shared/checkBeans.py || exit 1 |
| 56 | +# kubectl -n $myns exec -it $mypod \ |
| 57 | +# wlst.sh /shared/checkBeans.py \ |
| 58 | +# $username $password $url \ |
| 59 | +# /shared/checkBeans.input \ |
| 60 | +# > $outfile 2>&1 |
| 61 | +# if [ $? -ne 0 ]; then |
| 62 | +# echo "Error: checkBeans failed, see '$outfile'." |
| 63 | +# exit 1 |
| 64 | +# fi |
| 65 | +# |
32 | 66 |
|
33 | 67 | admin_username = sys.argv[1]
|
34 | 68 | admin_password = sys.argv[2]
|
|
0 commit comments