1 of 1 people found this helpful
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
With Bladelogic 8.2 you can now create a provision job without executing it, so the script above does actually the job.