I'm trying to get a list of patches contained in a Patch Policy in HPSA -- I can get what I need via the Twister web interface (under PatchPolicy.getPatches(), give it an ID, and it happily returns a list of patches contained.) -- I'm having a hard time getting this to work via the Pytwist interface, though... I haven't used the Pytwist interface for much besides some very basic Device manipulation, and Python is.. not my forte. I create the TwistServer object, then a PatchPolicy object from that (which I think is working..), but can't figure out how/where to call the getPatches() method from in Python-land.
If there's a way to dig this out of the database itself, that would work, too, but I can't seem to find much in there along these lines besides the vendor-recommended patching stuff, and we use custom policies.
the full Twister documentation is available in javadoc form at
http://<sa.core.address>:1032/twister
If you have some sample PyTwist scripts, modifying one to meet these demands should be pretty straight-forward :)
Can you post the code you have, and perhaps we can work with you to make some headway?
Should be as simple as: service = ts.this should be the Package from the web interface that you found getPatches()
I stripped down a 'PatchPolicy_2_CSV.py' script we created awhile back, there may be a few extra not needed lines in this script, but it works to print patch information of patches in a patch policy:
Sample Output: