forked from clarkja/ci.docker.websphere-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateHostName.py
executable file
·30 lines (19 loc) · 1.79 KB
/
updateHostName.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#####################################################################################
# #
# Script to update Hostname #
# #
# Usage : wsadmin -lang jython -f updateHostName.py <node name > < host name > #
# #
#####################################################################################
def updateHostName(nodename,hostname):
nlist = AdminConfig.list('ServerIndex')
attr=[["hostName", hostname ]]
AdminConfig.modify(nlist,attr)
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName BOOTSTRAP_ADDRESS -host '+ hostname +' -port 2809 -modifyShared true]')
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS -host '+ hostname +' -port 9402 -modifyShared true]')
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS -host '+ hostname +' -port 9403 -modifyShared true]')
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName ORB_LISTENER_ADDRESS -host '+ hostname +' -port 9100 -modifyShared true]')
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName SAS_SSL_SERVERAUTH_LISTENER_ADDRESS -host '+ hostname +' -port 9401 -modifyShared true]')
AdminTask.modifyServerPort('server1', '[-nodeName '+ nodename +' -endPointName SOAP_CONNECTOR_ADDRESS -host '+ hostname +' -port 8880 -modifyShared true]')
AdminConfig.save()
updateHostName(sys.argv[0], sys.argv[1])