5 Replies Latest reply on Aug 23, 2016 1:05 PM by Bill Robinson

    Can't get Job DBKey by Job Name

    Lucas Menendez

      I'm trying to use Jython an BladeLogic CLI to write a auto bulk agent installer agent but i can't get Job DBKey based its name and i don't know job type integer.

      ¿Where can i find the type id? ¿How can i get Job DBKey based on Job Name Job Group DBKey and Job Type ID?


      This is my code:

      import bladelogic.cli.CLI as blcli
      jli = blcli.CLI()
      job_name = r"JobName"
      goup_name = r"GroupName"
      job_type = <integer>
      group_key = jli.run(["JobGroup", "groupNameToDBKey"]).returnValue
      result = jli.run(["Job", "findByTypeGroupAndName"])
      print result
      if result.success():
           print result.returnValue
           print result.getError()


      And this is the result:

      Cannot find command : Job, findByTypeGroupAndName