rmbolger / Posh-IBWAPI

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

Multi-Host config support #12

Closed rmbolger closed 7 years ago

rmbolger commented 7 years ago

If you want to use this module against multiple WAPI endpoints, you currently have to either keep resetting the config values with Set-IBWAPIConfig or skip it and just pass the config values directly on each call. Both methods are annoying.

This change adds the ability for Set-IBWAPIConfig to support saving a config set per WAPIHost. Under the hood it's just a hashtable of config sets using WAPIHost as the key. Calling Set-IBWAPIConfig with just a -WAPIHost param will switch the currently active set. Adding additional parameters will switch and set those values. With no -WAPIHost param, it will just modify the values of the currently active set.