rmbolger / Posh-IBWAPI

PowerShell module for interacting with the Infoblox WAPI (REST API).
MIT License
54 stars 8 forks source link

Add optional batch processing for pipeline inputs using the "request" object #61

Closed rmbolger closed 2 years ago

rmbolger commented 2 years ago

Using pipeline input for large sets of changes such as the creation/deletion of many records is convenient, but not terribly efficient for large numbers of operations since each change is a separate WAPI call. The "request" object allows you to run many operations in a single WAPI call. It would be nice to have an optional switch on the functions that accept pipeline input that would effectively batch all of the changes into a single WAPI call (or at least fewer calls if they can't all fit into a single one).

Unfortunately, the WAPI docs don't have any info about the limitations of the request object such as how many operations are allowed in a single call or how large can a single request be. So there might be a bit of trial and error to discover what those limitations might be. Perhaps another optional parameter to explicitly declare the size of a batch group that defaults to something reasonable like 1000?

The request object also didn't exist until WAPI version 2.1 which is quite old at this point. But it might be helpful to gate the option based on version or at least mention the limitation in the module docs.

rmbolger commented 2 years ago

This is now being tested in the 4x branch.