pan-os-python icon indicating copy to clipboard operation
pan-os-python copied to clipboard

document how to use delete_similar

Open freedge opened this issue 1 year ago • 2 comments

Documentation link

https://pan-os-python.readthedocs.io/en/latest/howto.html#optimize-with-bulk-operations

Describe the problem

doc mentions delete_similar as an alternative to delete to perform bulk delete, but it's not clear how this feature should be used.

if calling fw.remove(obj) on an AddressObject, next call to obj.delete_similar() fails with an exception

No PanDevice set for object tree

Suggested fix

can the documentation include an example of usage of delete_similar ?

freedge avatar Mar 28 '23 15:03 freedge

:tada: Thanks for opening your first issue here! Welcome to the community!

Hi, @freedge were you able to find some details about it ? I'm looking for a way to bulk-delete huge amounts of objects (which actually takes a very long time with unit API calls), but I don't really understand if delete_similar is the right way to proceed, neither how to use it.

AnthoBalitrand avatar May 13 '23 13:05 AnthoBalitrand