mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
Merge branch 'dev' of https://github.com/benclaussen/NetboxPS into dev
This commit is contained in:
commit
0fd989c82a
16 changed files with 587 additions and 11 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -6,5 +6,6 @@
|
||||||
"powershell.codeFormatting.newLineAfterCloseBrace": false,
|
"powershell.codeFormatting.newLineAfterCloseBrace": false,
|
||||||
"[markdown]": {
|
"[markdown]": {
|
||||||
"files.trimTrailingWhitespace": false,
|
"files.trimTrailingWhitespace": false,
|
||||||
}
|
},
|
||||||
|
"powershell.codeFormatting.openBraceOnSameLine": true
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
55
Functions/DCIM/Cables/Get-NetboxDCIMCable.ps1
Normal file
55
Functions/DCIM/Cables/Get-NetboxDCIMCable.ps1
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
42
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
42
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
function Add-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint16]$Device,
|
||||||
|
|
||||||
|
[uint16]$Module,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint16]$Rear_Port,
|
||||||
|
|
||||||
|
[uint16]$Rear_Port_Position,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method POST
|
||||||
|
}
|
||||||
34
Functions/DCIM/FrontPorts/Get-NetboxDCIMFrontPort.ps1
Normal file
34
Functions/DCIM/FrontPorts/Get-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
function Get-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Device,
|
||||||
|
|
||||||
|
[uint16]$Device_Id,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
35
Functions/DCIM/FrontPorts/Remove-NetboxDCIMFrontPort.ps1
Normal file
35
Functions/DCIM/FrontPorts/Remove-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
function Remove-NetboxDCIMFrontPort {
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'High',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16[]]$Id,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($FrontPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMFrontPort -Id $FrontPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Name: $($CurrentPort.Name) | ID: $($CurrentPort.Id)", "Remove")) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Method DELETE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
60
Functions/DCIM/FrontPorts/Set-NetboxDCIMFrontPort.ps1
Normal file
60
Functions/DCIM/FrontPorts/Set-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
function Set-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16[]]$Id,
|
||||||
|
|
||||||
|
[uint16]$Device,
|
||||||
|
|
||||||
|
[uint16]$Module,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint16]$Rear_Port,
|
||||||
|
|
||||||
|
[uint16]$Rear_Port_Position,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($FrontPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMFrontPort -Id $FrontPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Front Port ID $($CurrentPort.Id)", "Set")) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method PATCH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Get-NetboxDCIMInterface {
|
||||||
function Get-NetboxDCIMInterface {
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
param
|
param
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Remove-NetboxDCIMInterface {
|
||||||
function Remove-NetboxDCIMInterface {
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Removes an interface
|
Removes an interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Set-NetboxDCIMInterface {
|
||||||
function Set-NetboxDCIMInterface {
|
|
||||||
[CmdletBinding(ConfirmImpact = 'Medium',
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
SupportsShouldProcess = $true)]
|
SupportsShouldProcess = $true)]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
|
|
@ -37,7 +36,9 @@ function Set-NetboxDCIMInterface {
|
||||||
[uint16]$Untagged_VLAN,
|
[uint16]$Untagged_VLAN,
|
||||||
|
|
||||||
[ValidateRange(1, 4094)]
|
[ValidateRange(1, 4094)]
|
||||||
[uint16[]]$Tagged_VLANs
|
[uint16[]]$Tagged_VLANs,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
|
|
|
||||||
48
Functions/DCIM/RearPorts/Add-NetboxDCIMRearPort.ps1
Normal file
48
Functions/DCIM/RearPorts/Add-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
function Add-NetboxDCIMRearPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint16]$Device,
|
||||||
|
|
||||||
|
[uint16]$Module,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint16]$Positions = 1,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method POST
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
34
Functions/DCIM/RearPorts/Get-NetboxDCIMRearPort.ps1
Normal file
34
Functions/DCIM/RearPorts/Get-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
function Get-NetboxDCIMRearPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Device,
|
||||||
|
|
||||||
|
[uint16]$Device_Id,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
35
Functions/DCIM/RearPorts/Remove-NetboxDCIMRearPort.ps1
Normal file
35
Functions/DCIM/RearPorts/Remove-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
function Remove-NetboxDCIMRearPort {
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'High',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16[]]$Id,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($RearPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMRearPort -Id $RearPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Name: $($CurrentPort.Name) | ID: $($CurrentPort.Id)", "Remove")) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Method DELETE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
65
Functions/DCIM/RearPorts/Set-NetboxDCIMRearPort.ps1
Normal file
65
Functions/DCIM/RearPorts/Set-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
|
||||||
|
function Set-NetboxDCIMRearPort
|
||||||
|
{
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16[]]$Id,
|
||||||
|
|
||||||
|
[uint16]$Device,
|
||||||
|
|
||||||
|
[uint16]$Module,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint16]$Positions,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process
|
||||||
|
{
|
||||||
|
foreach ($RearPortID in $Id)
|
||||||
|
{
|
||||||
|
$CurrentPort = Get-NetboxDCIMRearPort -Id $RearPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Rear Port ID $($CurrentPort.Id)", "Set"))
|
||||||
|
{
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method PATCH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
31
Functions/Extras/Get-NetboxTag.ps1
Normal file
31
Functions/Extras/Get-NetboxTag.ps1
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
function Get-NetboxTag {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint16]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Slug,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('extras', 'tags'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -953,6 +953,50 @@
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Get Device Rear Ports",
|
||||||
|
"request": {
|
||||||
|
"method": "GET",
|
||||||
|
"header": [],
|
||||||
|
"url": {
|
||||||
|
"raw": "{{SCHEME}}://{{HOSTNAME}}:{{PORT}}/api/dcim/rear-ports/",
|
||||||
|
"protocol": "{{SCHEME}}",
|
||||||
|
"host": [
|
||||||
|
"{{HOSTNAME}}"
|
||||||
|
],
|
||||||
|
"port": "{{PORT}}",
|
||||||
|
"path": [
|
||||||
|
"api",
|
||||||
|
"dcim",
|
||||||
|
"rear-ports",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Get Device Front Ports",
|
||||||
|
"request": {
|
||||||
|
"method": "GET",
|
||||||
|
"header": [],
|
||||||
|
"url": {
|
||||||
|
"raw": "{{SCHEME}}://{{HOSTNAME}}:{{PORT}}/api/dcim/front-ports/",
|
||||||
|
"protocol": "{{SCHEME}}",
|
||||||
|
"host": [
|
||||||
|
"{{HOSTNAME}}"
|
||||||
|
],
|
||||||
|
"port": "{{PORT}}",
|
||||||
|
"path": [
|
||||||
|
"api",
|
||||||
|
"dcim",
|
||||||
|
"rear-ports",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Add Interface",
|
"name": "Add Interface",
|
||||||
"request": {
|
"request": {
|
||||||
|
|
@ -983,6 +1027,64 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Add Rear Port",
|
||||||
|
"request": {
|
||||||
|
"method": "POST",
|
||||||
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "Content-Type",
|
||||||
|
"value": "application/json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"body": {
|
||||||
|
"mode": "raw",
|
||||||
|
"raw": "{\r\n \"device\": 62,\r\n \"name\": \"RearPort1\",\r\n \"type\": 110-punch\r\n}"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"raw": "{{SCHEME}}://{{HOSTNAME}}:{{PORT}}/api/dcim/rear-ports/",
|
||||||
|
"protocol": "{{SCHEME}}",
|
||||||
|
"host": [
|
||||||
|
"{{HOSTNAME}}"
|
||||||
|
],
|
||||||
|
"port": "{{PORT}}",
|
||||||
|
"path": [
|
||||||
|
"api",
|
||||||
|
"dcim",
|
||||||
|
"rear-ports",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Extras",
|
||||||
|
"item": [
|
||||||
|
{
|
||||||
|
"name": "Get Tags",
|
||||||
|
"request": {
|
||||||
|
"method": "GET",
|
||||||
|
"header": [],
|
||||||
|
"url": {
|
||||||
|
"raw": "{{SCHEME}}://{{HOSTNAME}}:{{PORT}}/api/extras/tags/",
|
||||||
|
"protocol": "{{SCHEME}}",
|
||||||
|
"host": [
|
||||||
|
"{{HOSTNAME}}"
|
||||||
|
],
|
||||||
|
"port": "{{PORT}}",
|
||||||
|
"path": [
|
||||||
|
"api",
|
||||||
|
"extras",
|
||||||
|
"tags",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue