This content has been marked as final. Show 2 replies
Do you really need to use csv? Do you just want to pass some parameters to wlst?
In wlst you can use properties files with content like "var=value":
And invoke in wlst with the command loadProperties('FILENAME'). The parameters at the property file will be available by the variable name, so, using the example (var1=one), it'll work like that:
If you just want to restart your managed servers, you could do something like that:
connect() varServers = cmo.getServers() for server in varServers: #use this to not shutdown the admin server varServerName = server.getName() if varServerName == varAdminServerName: continue #try to shutdown the server try: shutdown(varServerName,force='true') except Exception: print 'Server ' + varServerName +' already down.' #a look to try to start the server. Sometimes the process was not shutdowned already. for counter in range(1,10): try: start(varServerName) break except Exception: os.system('sleep 30') else: print 'Something went wrong starting ' + varServerName exit(exitcode=1)
Edited by: 904641 on Mar 29, 2012 12:36 PM