8 Replies Latest reply: Sep 25, 2012 9:23 AM by Bill Robinson RSS

8.2.01: How to create patch analysis/remediation job with automatically starting remediation

swyns

Hi,

 

I'm porting some patch management scripts from 7.6 to 8.2.01. And there's one problem I don't seem to get over.

 

Ik the past we used a deployoptions property class to set the remediation job properties. When we then started the patch analysis job which had the remediation options set it woud create the remediation job and start it automatically.

 

Within 8.2 there are a few differences: I'm using a template job to set the settings for the remediation job which works fine. I just can't find a way to start the job automatically. The goal is to create a patch analysis and remediate job which people can use in a "Execute against" way. So they take the job for this month, right click it, execute agains, choose servers, and ok, the servers are analysing and will deploy the patches automatically.

 

This are the commands I execute:

blcli_execute PatchingJob createWindowsPatchingJobWithTargetServer NSH-PNW-April2012_PatchAnalysis-v1.0.0 - Analysis and Remediate /DJL/Patch Management Jobs/Windows Patch Analysis/Patch Analysis Jobs DummyTarget /DSL/Patch Management Items/Windows Patch Analysis/Catalogs/Windows Patch Catalog-v1.0.0 /D/Security/Development/Windows/IncludeLists/SecPatches201204.txt  false true false true
blcli_execute PatchingJob getDBKeyByGroupAndName /DJL/Patch Management Jobs/Windows Patch Analysis/Patch Analysis Jobs NSH-PNW-April2012_PatchAnalysis-v1.0.0 - Analysis and Remediate
blcli_execute Job clearTargetServers DBKey:SJobModelKeyImpl:2646826-1-19383330
blcli_execute PatchingJob setRemediationWithDeployOptions DBKey:SJobModelKeyImpl:2646826-2-19383330 None /DSL/Staging Packages/Windows /DJL/Patch Management Jobs/Windows Patch Analysis/Patch Deploy Jobs DBKey:SJobModelKeyImpl:2646733-1-19357858
blcli_execute PatchingJob getDBKeyByGroupAndName /DJL/Patch Management Jobs/Windows Patch Analysis/Patch Analysis Jobs NSH-PNW-April2012_PatchAnalysis-v1.0.0 - Analysis and Remediate
blcli_execute Utility setTargetObject
blcli_execute PatchingJob setAutoRemediationOption 4

 

The return:

DEBUG: blcli_execute PatchingJob setAutoRemediationOption 4
DEBUG: Executed blcli_execute "PatchingJob setAutoRemediationOption 4" >nul:
Command execution failed. java.lang.IllegalArgumentException: object is not an instance of declaring class

 

I've found the "PatchingJob setAutoRemediationOption" command in the unreleased commands but the description is quite cryptic. They speak of values as strings but the command expects integers.

 

Maybe someone has tackled this one before? Don't know how it works on 8.x

 

Any help is welcome.