Closed joewesch closed 7 months ago
I have this implemented and could submit a PR. It supports a list of objects or a list of ids from any endpoint. Is this what you were envisioning?
pynautobot.dcim.devices.delete(pynautobot.dcim.devices.all())
pynautobot.dcim.devices.delete(pynautobot.dcim.devices.filter(name__ic="foo"))
pynautobot.dcim.devices.delete(["db8770c4-61e5-4999-8372-e7fa576a4f65","e9b5f2e0-4f20-41ad-9179-90a4987f743e"])
Yeah, if it can be dynamic and take both that sounds great.
Submitted the PR. Let me know if anything needs to be addressed prior to approving.
Many endpoints allow for bulk delete by sending in a list of ID's to the endpoint. We should allow for this feature in pynautobot.
Example usage: