Start work on Front and Rear ports

This commit is contained in:
sheffsix 2023-03-13 09:21:14 +00:00
parent ea93390f8d
commit 15a2e98662
3 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,37 @@

function Get-NetboxDCIMFrontPort
{
[CmdletBinding()]
[OutputType([pscustomobject])]
param
(
[uint16]$Limit,
[uint16]$Offset,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[uint16]$Id,
[uint16]$Name,
[string]$Device,
[uint16]$Device_Id,
[uint16]$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
}
}

View file

@ -0,0 +1,37 @@

function Get-NetboxDCIMRearPort
{
[CmdletBinding()]
[OutputType([pscustomobject])]
param
(
[uint16]$Limit,
[uint16]$Offset,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[uint16]$Id,
[uint16]$Name,
[string]$Device,
[uint16]$Device_Id,
[uint16]$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
}
}

View file

@ -953,6 +953,50 @@
},
"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",
"request": {