PowerNetbox v4.6.0.3
·
27 commits
to main
since this release
Bug fix
Device.position typed as [uint16] lost precision on fractional rack positions (#412) — reported by @mkarel
NetBox stores rack position as a float so half-U devices can sit at 1.5U, 2.5U, etc. PowerNetbox typed the Position parameter as [uint16], silently truncating 1.5 to 1 on input and round-trip.
New-NBDCIMDevice/Get-NBDCIMDevice:Positionis now[double]with[ValidateRange(0.5, 999.99)].Set-NBDCIMDevice:Positionis now[Nullable[double]]. No[ValidateRange]— it fires before[Nullable[T]]binding, so-Position $null(unrack the device) would otherwise throwValidationMetadataException(same pattern as #398). Server-side validation enforces the bound;-Position $nullcorrectly clears the field.
Fractional positions now round-trip correctly. Existing integer-position callers are unaffected (1 still binds as 1.0).
8 new unit tests (fractional preserve, integer-as-double, sub-0.5 rejection on New/Get, null-clear on Set, parameter-type assertions).
Co-Authored-By: Matt Karel mkarel@gmail.com
Full Changelog: v4.6.0.2...v4.6.0.3