Releases: rmbolger/Posh-IBWAPI
Releases · rmbolger/Posh-IBWAPI
v4.2.0
- Added the option to disable session re-use via the
-NoSessionswitch on config profiles and individual public functions. This can negatively affect performance and increase audit log verbosity for large numbers of WAPI calls but is useful in certain edge cases.- When used with
Set-IBConfigall subsequent function calls using that profile will no longer create or save sessions with the WAPI host. Use-NoSession:$falseto unset. - When a profile has sessions enabled, you can still disable session re-use on a per-call basis by adding the
-NoSessionswitch to the function you're using. - Per-call functions include Get/New/Remove/Set-IBObject, Get-IBSchema, Invoke-IBFunction/IBWAPI, and Receive/Send-IBFile.
- When used with
- Added support for IBWAPI_NOSESSION environment variable when using stateless mode.
v4.1.0
- Added
-Inheritanceswitch toGet-IBObjectwhich requests WAPI to return inherited values for returned fields that support inheritance. This requires WAPI 2.10.2 or later.- WARNING: Depending on the field, the structure of the field's data may be different than a non-inheritance request. Be sure to test both ways to understand the differences in your use-case.
- Fixed a problem with BatchMode calls to
Get-IBObjectthat wouldn't properly send the-ProxySearchflag to batched queries when specified. - Changed low level URL encoding method to use
[System.Uri]::EscapeDataString()which removes the explicit dependency on System.Web that was needed in PowerShell 5.1.
v4.0.2
v4.0.1
v4.0.0
New Features
Get/New/Set/Remove-IBObjectall now have a-BatchModeswitch and-BatchGroupSizeinteger parameter. Using these can increase performance when used with pipeline input by grouping the objects into fewer WAPI calls using the WAPIrequestobject instead of making a separate call for each input.- WAPI seems to treat these batch requests as a single transaction. So if one of the requests in a group fails, the rest are cancelled/reverted.
- The default batch group size is 1000 which corresponds to the maximum page size when doing Get queries. But there is no Infoblox documented maximum, so the size can theoretically be increased to the Int32 maximum of 2147483647.
- The module now supports running stateless by using an environment variable based connection profile. (Guide)
- Connection profiles can now be stored using PowerShell SecretManagement instead of a local config file. (Guide)
- Documentation Revamp
- https://docs.dvolve.net/Posh-IBWAPI/ is a new dedicated website for Posh-IBWAPI documentation. Existing guides and tutorials have been migrated there from the Github wiki. The site is currently generated using the Markdown files in the
docsfolder in the main project repository by MkDocs. So it should now be easier to contribute fixes and updates. - The native module help is now also generated by platyPS from the Markdown files in
docs/Functions. Get-Help <function name> -Onlineshould now open your browser to the appropriate page on the documentation site.
- https://docs.dvolve.net/Posh-IBWAPI/ is a new dedicated website for Posh-IBWAPI documentation. Existing guides and tutorials have been migrated there from the Github wiki. The site is currently generated using the Markdown files in the
Enhancements
- The
-Filterparameter onGet-IBObjectnow supports using an IDictionary (such as a hashtable) to specify filters rather than just a string array.- For example,
-Filter @{'name~'='myrec'}is the same as-Filter 'name~=myrec'. - Filters passed by dictionary will be automatically URL encoded instead of the caller needing to URL encode the filters in advance. This most useful when using regular expressions with a lot of special characters.
- String based filters will continue to be passed as-is in the HTTP GET request like they were prior to 4.0.
- For example,
- The module will keep a cache of "readable fields" when
Get-IBObjectis used with-ReturnAllso that subsequent calls for all fields from the same object type won't need to make additional schema queries. Invoke-IBWAPIwill now automatically handle UTF-8 encoding JSON bodies when-ContentTypeis not specified. When-ContentTypeis specified, the body parameter will be sent as-is.Invoke-IBWAPIhas an additional parameter set which takes a-WAPIHost,-WAPIVersion, and-Queryparameter instead of the normal-Uriparameter.- Tweaked Verbose and Debug logging throughout the module. JSON request bodies are now included in the Verbose output for functions that send them.
Breaking Changes
- Most errors returned by the WAPI have been changed from terminating to non-terminating errors to better adhere to PowerShell standards. This will have a few notable effects on scripts using this module:
- If there is an error thrown from one of the input objects when using the pipeline, the error will be sent to the error stream and the pipeline will continue processing the next object instead of terminating.
- When you call a module function from within a script and it generates an error, the error will be sent to the error stream and the rest of the script will still be executed instead of terminating.
- If your scripts currently depend on functions throwing terminating errors, you can re-enable that behavior by passing the
-ErrorAction Stopparameter or setting the$ErrorActionPreference = 'Stop'variable which is normally set toContinue.
- The minimum PowerShell version requirements have been increased to 5.1 for legacy Windows PowerShell and 7.0 for cross-platform PowerShell. Partial functionality may still work on older versions, but they are no longer being tested against.
- The
-Filtersparameter onGet-IBObjecthas been renamed to-Filterbut will continue to have a-Filtersalias until at least the next major version. - The
-ReturnAllFieldsparameter onGet-IBObjecthas been renamed to-ReturnAllbut will continue to have a-ReturnAllFieldsalias until at least the next major version. - The
-ReturnBaseFieldsparaemter onGet/Set/New-IBObjecthas been renamed to-ReturnBasebut will continue to have a-ReturnBaseFieldsalias until at least the next major version. - The
-ReturnFieldsparameter onGet/Set/New-IBObjecthas been renamed to-ReturnFieldbut will continue to have a-ReturnFieldsalias until at least the next major version. - Automatic migration from 1.x connection profiles is no longer supported.
v3.2.2
- Added ObjectType argument completer for
Get-IBObject,New-IBObject, andGet-IBSchema. Currently requires having already runGet-IBSchemato cache the potential values. - Fixed issue propagating SkipCertificateCheck switch in api calls during
Send-IBFileandReceive-IBFile
v3.2.1
- Added additional examples on
New-IBObjectandGet-IBObject(Thanks @qlikq) - Fixed
Send-IBFilethrowing a PropertyNotFound exception when no FunctionArgs are specified. (#55) (Thanks @demdante) - Fixed
Remove-IBConfig -Allnot working - Corrupt or unparseable config files are now handled more gracefully.
- Added a warning when importing a config on Linux/Mac that was originally created on Windows
Export-IBConfigno longer writes an output file if no profiles are defined.
v3.2.0
- An optional
ProfileNameparameter has been added to the public functions that already accept connection specific parameters (#49). This will allow you to switch profiles on a per-call basis more easily. The connection specific parameters will still override the a specified profile's values. These are the affected functions:- Get-IBObject
- Get-IBSchema
- Invoke-IBFunction
- New-IBObject
- Receive-IBFile
- Remove-IBObject
- Send-IBFile
- Set-IBObject
ProfileNameis now a positional parameter inRemove-IBConfig- Minor efficiency improvements in
Get-IBObjectfor results with many pages. - The name of the default branch in git has been renamed from master to main.