1
1
#------------------------------------------------------------------------------------
2
2
# configuretWasUsageMetering.py - configure tWAS server with usage metering feature
3
- # https://www.ibm.com/docs/en/ws-automation?topic=vulnerabilities-adding -websphere-application-server-server#cf-t-add-was__wsascript
3
+ # https://www.ibm.com/docs/en/ws-automation?topic=monitoring-registering -websphere-application-server-traditional-servers
4
4
#------------------------------------------------------------------------------------
5
5
#
6
6
# This script configures a traditional WebSphere Application Server with the usage
@@ -176,8 +176,7 @@ def configuretWasUsageMetering(url, apiKey, sslRef, trustStoreName, trustStorePa
176
176
#-------------------------------------------------------------
177
177
if len (certAlias ) == 0 :
178
178
# use default certificate alias if it is not specified
179
- # NOTE: the alias is stored in all lower case even if it has CAPS.....
180
- certAlias = "meteringalias" .lower ()
179
+ certAlias = "meteringalias"
181
180
print "Using default certificate alias: " + certAlias
182
181
183
182
# delete certificate if it exists in keystore
@@ -187,9 +186,8 @@ def configuretWasUsageMetering(url, apiKey, sslRef, trustStoreName, trustStorePa
187
186
start = cert .find ("alias" )
188
187
end = cert .find ("] [version" )
189
188
alias = cert [start + 6 :end ]
190
- print "checking signer: " + alias
191
189
if alias == certAlias .lower ():
192
- print "Deleting signer: " + alias
190
+ print "Deleting existing certificate ... " + alias
193
191
AdminTask .deleteSignerCertificate (['-keyStoreName' , trustStoreName , '-certificateAlias' , alias ])
194
192
195
193
# retrieve new certificate from api-usagemetering-host and port
@@ -1090,7 +1088,7 @@ def _splitlist(s):
1090
1088
if len (url ) > 0 :
1091
1089
print " url: " + url
1092
1090
if len (apiKey ) > 0 :
1093
- print " apiKey: " + "********" #### [email protected] - do not echo sensitive info
1091
+ print " apiKey: " + "********"
1094
1092
if len (sslRef ) > 0 :
1095
1093
print " sslRef: " + sslRef
1096
1094
if len (trustStoreName ) > 0 :
@@ -1113,3 +1111,5 @@ def _splitlist(s):
1113
1111
configuretWasUsageMetering (url , apiKey , sslRef , trustStoreName , trustStorePassword , certAlias , nodeName , serverName , clusterName , startServers , namespace )
1114
1112
1115
1113
#endIf
1114
+
1115
+
0 commit comments