2 Replies Latest reply on Jun 13, 2011 10:03 AM by Milton Stamper

    Changing roles within a script

    Milton Stamper

      The following script works fine w/in the NSH cli:


      blconnect () {


      blcli_setoption serviceProfileName AUTH_SERVICE

      blcli_setoption roleName AUTH_ROLE






      for AUTH_ROLE in windowsRole linuxRole hpuxRole solarisRole



           echo $AUTH_ROLE listing starts....

           blcli_execute Server listAllServers



      It's just a simple script to list all of the servers within the roles to which I have rights. The script does NOT, however work within the BL GUI as a script job. There are no errors given and I get as many server listings as  roles (windowsRole, linuxRole, etc.) but the job log shows the same servers for each role listed (in this case it shows the servers within my Windows role). It gives 4 listings as requested by the script but the server listing is the same each time.


      I assume this is because I am signed in to the GUI under my Windows role but I can change my role within the NSH cli. Is there no way to do this same kind of thing w/in the script in an NSH script job?


      BTW, I understand that I don't need the blconnect function w/in a script job via the GUI because I'm logged into the GUI using that role and the script is passed those credentials.