Commit ac72491
committed
refactor: remove dead InterfaceConnection functions (endpoint removed in NetBox 4.0)
The /api/dcim/interface-connections/ endpoint was superseded by the
Cables model in NetBox 4.0 and is no longer exposed by the API. Verified
against all three supported NetBox versions — 4.3.7 (minimum), 4.4.10,
and 4.5.8 all return HTTP 404 for GET /api/dcim/interface-connections/,
and the path is absent from each version's OpenAPI schema.
Consumers calling these four functions were receiving 404s, not useful
output. This was a long-standing dead branch inherited from the NetboxPS
fork that the 2026-04-17 drift audit surfaced as the last remaining
ValidateSet-parity finding (#392 item 9).
Removed:
- Functions/DCIM/Interfaces/Get-NBDCIMInterfaceConnection.ps1
- Functions/DCIM/Interfaces/New-NBDCIMInterfaceConnection.ps1
- Functions/DCIM/Interfaces/Set-NBDCIMInterfaceConnection.ps1
- Functions/DCIM/Interfaces/Remove-NBDCIMInterfaceConnection.ps1
Related cleanup:
- Functions/Helpers/_Aliases.ps1: drop Add-NBDCIMInterfaceConnection
(the legacy alias for New-).
- Tests/DCIM.Interfaces.Tests.ps1: remove four Context blocks plus
InterfaceConnection entries from the WhatIf/All-PageSize/Omit
TestCases arrays. The remaining 9 Interface tests still pass.
- PowerNetbox.psd1: FunctionsToExport regenerated by deploy.ps1
without the 4 removed functions; AliasesToExport drops
Add-NBDCIMInterfaceConnection.
Migration: callers should use the Cables API instead. A direct cable
between two interfaces in PowerNetbox:
New-NBDCIMCable -A_Terminations @(@{object_type='dcim.interface'; object_id=1}) `
-B_Terminations @(@{object_type='dcim.interface'; object_id=2})
After this commit the parity tool reports "All ValidateSets match
NetBox v4.5.8" — #392 drift backlog fully closed.
Breaking change: any caller still using {Get,New,Set,Remove}-
NBDCIMInterfaceConnection (or the Add- alias) will get a
CommandNotFoundException. In practice no such caller can exist, since
every call to the underlying endpoint has returned 404 across the
entire supported NetBox version range.1 parent b44934e commit ac72491
7 files changed
Lines changed: 25 additions & 426 deletions
Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 0 additions & 86 deletions
This file was deleted.
Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 0 additions & 75 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
0 commit comments