Init. functions for cables and cable terminations

This commit is contained in:
sheffsix 2023-03-14 13:05:25 +00:00
parent 9b2b978a7b
commit 115b28a48d
2 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,38 @@

function Get-NetboxDCIMCableTermination
{
[CmdletBinding()]
#region Parameters
param
(
[uint16]$Limit,
[uint16]$Offset,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id,
[uint16]$Cable,
[string]$Cable_End,
[string]$Termination_Type,
[uint16]$Termination_ID,
[switch]$Raw
)
#endregion Parameters
process
{
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'cable-terminations'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
InvokeNetboxRequest -URI $URI -Raw:$Raw
}
}

View file

@ -0,0 +1,58 @@

function Get-NetboxDCIMCable
{
[CmdletBinding()]
#region Parameters
param
(
[uint16]$Limit,
[uint16]$Offset,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id,
[string]$Label,
[string]$Termination_A_Type,
[uint16]$Termination_A_ID,
[string]$Termination_B_Type,
[UInt16]$Termination_B_ID,
[string]$Type,
[string]$Status,
[string]$Color,
[UInt16]$Device_ID,
[string]$Device,
[uint16]$Rack_Id,
[string]$Rack,
[uint16]$Location_ID,
[string]$Location,
[switch]$Raw
)
#endregion Parameters
process
{
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'cables'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
InvokeNetboxRequest -URI $URI -Raw:$Raw
}
}