when you run the blcli (or blcli2) it creates a jvm, runs a command and closes the jvm. any options you pass to it affect only that instance of the jvm. so in your first example, the option to enable the unreleased commands is doing nothing there.
to enabled the unreleased commands in jython you need to modify the br/bljython.cfg file and add that -D option to the java args in the file.
is there a reason you are writing in jython? you should also look at the 'performance commands' that work inside a nsh shell/session - eg blcli_execute NameSpace command args...
Thanks for the prompt reply!
I'm using Jython as recommended in the "BLCLI Help".
(in "C:/Program Files/BMC Software/BladeLogic/8.0/onlinehelp/help/cli" installation folder)
The advantages of using Jython are explained in the file "JLI.4.2.html" in that folder.
Also, I would like the script to run under the credentials of the user executing the BL Job.
(I believe that in NSH I select the credintials inside the script)
Finally, I'm familiar with Jython from back in the days, when I developed deploy scripts for IBM WebSphere Server (I'm now working with IIS Servers). I'm less familiar with bash scripts.
Thanks for the solution above, I'll go try it right away.
P.S. I also couldn't find much documentation on the NSH shell.
I got these documents:
BMC Installation Folder\onlinedoc\BMCBladeLogicNSHCommands.pdf
and of course - fabulous the BMC forums :-)
If you know any other sources, I'd love to know.
Thanks a million! this was exactly the solution.
just one more quick question, I looked at:
I want to convert the result I get from
from headers to BDKeys.
In that post, the NSH script uses "blcli_storeenv" command to make the other commands (Job getDBKey, Utility setTargetObject, and Utility listPrint) operate on the list.
Is there an equivalent in Jython?
if your blcli function run is called run_blcli_cmd, then you do like this i think:
keys = run_blclI_cmd("Utility","listPrint").returnValue