I'm trying to write a script to deploy an application to Websphere using the wsadmin.sh scripting tool. I am able to do it directy on the command line like this:
$AdminApp install c:\someFolder\someEar.ear {-MapModulesToServers {{.* .* WebSphere:cell=cellName,node=nodeName,server=serverName}}}
Now I'm trying to do the same by running a python module.
This works (so without the MapModulesToServers option):
AdminApp.install("c:\someFolder\someEar.ear")
Now I'm trying to add the MapModulesToServers option and no matter what I try I get the error 'IllegalArgumentException: WASX7122E: Expected "-" not found.'
I've tried googling for this message but haven't been able to find a solution. Some of the syntax I've tried:
AdminApp.install('c:/someFolder/someEar.ear', '[-MapModulesToServers [WebSphere:cell=mycell,node=mynode,server=server1]]')
This one was taken straight from the commandAssistanceJythonCommands_admin.log after manually deploying in the console. So this is the syntax that websphere produced for my ear:
AdminApp.install('C:/someFolder/someEar.ear', '[-nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname csiva-ear -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -noenableClientModule -clientMode isolated -novalidateSchema -MapModulesToServers [["Wicket Examples" someWar.war,WEB-INF/web.xml WebSphere:cell=cellName,node=nodeName,server=serverName]]]')
Any help would be greatly appreciated.