Created
May 18, 2013 12:31
-
-
Save miglen/5604248 to your computer and use it in GitHub Desktop.
Script for creation of new manage server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script for connecting and creating new Manage Server in WLS | |
@author: Miglen Evlogiev <wls@miglen.com> | |
@date 2:52 PM 5/18/2013 | |
""" | |
#Variables | |
_username='system' | |
_password='Welcome1' | |
_hostname='192.168.1.202' | |
_port='7001' | |
_protocol='t3' | |
_newServerName='manserv03' | |
_newServerIp='127.0.0.1' | |
_newServerPort=7007 | |
_newServerSslPort=7010 | |
#Connect to the WLS | |
def conn(): | |
try: | |
connect(_username,_password,_protocol + '://' + _hostname + ':' + _port) | |
except ConnectionException,e: | |
print "Connection failed" | |
exit() | |
def nmsrv(): | |
edit() | |
startEdit() | |
cd('/') | |
cmo.createServer(_newServerName) | |
cd('/Servers/'+_newServerName) | |
cmo.setListenAddress(_newServerIp) | |
cmo.setListenPort(_newServerPort) | |
cd('/Servers/'+_newServerName+'/SSL/'+_newServerName) | |
cmo.setEnabled(true) | |
cmo.setListenPort(_newServerPort) | |
save() | |
activate() | |
conn() | |
nmsrv() | |
disconnect() | |
exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment