The AdminTask wsadmin command written in Jython does not support sub-list parameters

If a Jacl script calls $AdminTask methods, parameters containing sub-lists are supported. However, if a Jython script calls AdminTask methods with parameters containing sub-lists, then all the parameters must be combined into a single space-separated parameter. As opposed to the other wsadmin commands: AdminConfig or AdminControl or AdminApp, which supports parameters containing sub-lists.

If the Jacl script does not use any AdminTask methods containing sub-list parameters, then no additional changes are required on the converted Jython script generated by the Jacl2Jython program. However, if your input Jacl scripts use $AdminTask methods with parameters containing sub-lists, the converted Jython script generated by the Jacl2Jython program needs to be manually modified.

The following is an example of a Jacl script calling an $AdminTask method containing a sub-list parameter and its converted Jython script generated by the Jacl2Jython program:
JACL:   $AdminTask createCluster [list -clusterConfig [list
       -clusterName $myClusterName]]
==>
JYTHON: AdminTask.createCluster( ["-clusterConfig", [
       "-clusterName", myClusterName]] #?PROBLEM? convert to string

Solution

In the converted Jython script, you need to modify any AdminTask method invocations with parameters containing sub-lists to use a single string containing space-separated string parameters, and remove any commas and variables.
JYTHON: AdminTask.createCluster('["-clusterConfig" [
       "-clusterName" "' +str(myClusterName)+ '"]]') #manually modified

Feedback