mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
* Fix trailing white space using Invoke-ScriptAnalyzer -Fix -Path . -Recurse * add settings.json for configure Visual Code (Formatter) * PSSA: Fix Command accepts pipeline input but has not defined a process block * PSSA: Fix PSUseDeclaredVarsMoreThanAssignments The variable 'I_B' is assigned but never used The variable 'I_A' is assigned but never used * PSSA: Fix PSUseShouldProcessForStateChangingFunctions Function New-/Set-... has verb that could change system state. Therefore, the function has to support 'ShouldProcess'
46 lines
No EOL
1.3 KiB
PowerShell
46 lines
No EOL
1.3 KiB
PowerShell
<#
|
|
.NOTES
|
|
===========================================================================
|
|
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
|
|
Created on: 3/23/2020 12:10
|
|
Created by: Claussen
|
|
Organization: NEOnet
|
|
Filename: Get-NetboxDCIMInterfaceConnection.ps1
|
|
===========================================================================
|
|
.DESCRIPTION
|
|
A description of the file.
|
|
#>
|
|
|
|
|
|
function Get-NetboxDCIMInterfaceConnection {
|
|
[CmdletBinding()]
|
|
[OutputType([pscustomobject])]
|
|
param
|
|
(
|
|
[uint16]$Limit,
|
|
|
|
[uint16]$Offset,
|
|
|
|
[uint16]$Id,
|
|
|
|
[object]$Connection_Status,
|
|
|
|
[uint16]$Site,
|
|
|
|
[uint16]$Device,
|
|
|
|
[switch]$Raw
|
|
)
|
|
|
|
if ($null -ne $Connection_Status) {
|
|
$PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
|
|
}
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interface-connections'))
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
|
|
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
|
|
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
|
} |