mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-16 11:15:46 +00:00
Address(IPAM): Fix PSSA about Command accepts pipeline input but not defined a process block
This commit is contained in:
parent
354aeb66d3
commit
eea2eebc82
2 changed files with 25 additions and 21 deletions
|
|
@ -54,6 +54,7 @@ function Get-NetboxIPAMAvailableIP {
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'prefixes', $Prefix_ID, 'available-ips'))
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'prefixes', $Prefix_ID, 'available-ips'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters -SkipParameterByName 'prefix_id'
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters -SkipParameterByName 'prefix_id'
|
||||||
|
|
@ -61,4 +62,5 @@ function Get-NetboxIPAMAvailableIP {
|
||||||
$uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
$uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
InvokeNetboxRequest -URI $uri -Raw:$Raw
|
InvokeNetboxRequest -URI $uri -Raw:$Raw
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -90,6 +90,7 @@ function New-NetboxIPAMAddress {
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-addresses'))
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-addresses'))
|
||||||
$Method = 'POST'
|
$Method = 'POST'
|
||||||
|
|
||||||
|
|
@ -111,6 +112,7 @@ function New-NetboxIPAMAddress {
|
||||||
if ($Force -or $PSCmdlet.ShouldProcess($Address, 'Create new IP address')) {
|
if ($Force -or $PSCmdlet.ShouldProcess($Address, 'Create new IP address')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue