2 Replies Latest reply on Mar 1, 2012 7:19 AM by Richard Bayer

    Provision.provisionDevice with SNMP notification?

    Richard Bayer

      Hi all,


      does anybody has an idea how to set a SNMP notification for a provsision job created with BLCLI?


      When you run the blcli to create the provision job, the job is started right away, but it seems there are no options to specify the notification parameters. You can only set "Job.Provision.JOB_FOLDER_ID" and "Job.Provision.JOB_NAME" (according to the docs).





        • 1. Provision.provisionDevice with SNMP notification?
          Richard Bayer

          I found out how to set a notification after the job has been created. However the problem still exists, that a privision job is started right away after you have created it. So setting a notification for a running job is quite useless, as it will not affect it.



          blcli_execute Utility createModelObject Notification
          blcli_execute Utility setTargetObject
          blcli_execute Notification setName MySmtpNotification
          blcli_execute Notification setRecipient smtphost.demo.org
          # send trap in all cases (success, failure & abortion)
          blcli_execute Notification setStatusTypes 14
          # this should be a smtp trap
          blcli_execute Notification setNotificationType 3
          blcli_execute Utility objectToList
          blcli_execute Utility setTargetObject
          blcli_execute Utility storeTargetObject MyNotificationList
          # find the right job - a provision job in this case
          blcli_execute Job findByTypeGroupAndName "/Operating System Deployment" "test.os_deployment" 5029
          blcli_execute Job addNotificationList NAMED_OBJECT=MyNotificationList
          blcli_execute Job update
          • 2. Provision.provisionDevice with SNMP notification?
            Richard Bayer

            With Bladelogic 8.2 you can now create a provision job without executing it, so the script above does actually the job.