Data Center Automation Practitioners Forum
cancel

Help with OCLI syntax to add windows patches to patch policy

Highlighted
Kevin S. Young
Frequent Contributor.

Help with OCLI syntax to add windows patches to patch policy

I am using the OCLI API through global shell, trying to add a windows patch to a windows patch policy. I have the reference numbers of both the policy and the patch. I am attempting to use the method addPatches method, but cant get it to work. (/opsw/api/com/opsware/swmgmt/PatchPolicyService/method/addPatches)

I have attempted various methods, example: ./addPatches patch:i=7290301 policy:i=7550301 but none seem to work. Can you help me out with the syntax? I have looked at the docs and the twist help files and cant seem to get it figured out.
1 REPLY
Abhijit Priyada
New Member.

Re: Help with OCLI syntax to add windows patches to patch policy

you need to get the ./.findPatchPolicyRefs\:i, something like - com.opsware.swmgmt.WindowsPatchPolicyRef:7550301

The string returned is the policy ref which should be used in the command like -

./addPatches patch:i='com.opswa...7290301' policies:i='com.opsware.swmgmt.WindowsPatchPolicyRef:7550301'

hth
Abhijit