In order for it to be possible to use the Jython modules provided in the MC-CLI, you must take account of the following requirements in your MC-CLI script.
Every MC-CLI script that addresses Java classes, must contain the corresponding
import
statements for the Java classes of the MC-CLI (see Java classes ):import com.fujitsu.ts.jca.tools.mc.cli.BcDef as BcDef import com.fujitsu.ts.jca.tools.mc.cli.BcParameterException as BcParameterException import com.fujitsu.ts.jca.tools.mc.cli.BcObjectException as BcObjectException import com.fujitsu.ts.jca.tools.mc.cli.BcToolException as BcToolException
You must issue an
import
statementimport <mc-cli-module>
for each MC-CLI module whose functions are called in the script.
(e.g. importBcAdminMain
)At the start of the script, you must call the function
BcAdminMain.init()
which starts the Management Console session and reads the configuration file.
After that, you can call other MC-CLI functions.If a proxy or proxy cluster are protected by an administration password then you must perform a successful authentication of this object before calling a function that uses the proxy or proxy cluster as a parameter (see the function authenticate() - Authenticate at proxy cluster ).
In order for changes to become effective, they must be explicitly saved and integrated in the configuration of the associated component. This is done via the parameter
action
(= "save
", "update-config
", "update-ra-xml"
) in theperform()
function or the parametersave_all=True
inBcAdminMain.close()
.At the end of the script, it is necessary to call the function
BcAdminMain.close()
in order to exit the Management Console session. Only then is it possible to start other Management Console sessions using the same configuration file.If a Management Console session is not exited correctly then the synchronization file
ConsoleInUse.txt
in the Management Console installation directory may not be deleted and all subsequent attempts to start a Management Console session will be aborted. In such cases, this file must be deleted manually.