mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
Remove references to ValidateDCIMChoice for #40
This commit is contained in:
parent
6965f61e6e
commit
27209d6917
9 changed files with 0 additions and 50 deletions
|
|
@ -73,10 +73,6 @@ function Get-NetboxDCIMDevice {
|
||||||
#endregion Parameters
|
#endregion Parameters
|
||||||
|
|
||||||
process {
|
process {
|
||||||
if ($null -ne $Status) {
|
|
||||||
$PSBoundParameters.Status = ValidateDCIMChoice -ProvidedValue $Status -DeviceStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'devices'))
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'devices'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
||||||
|
|
|
||||||
|
|
@ -52,22 +52,6 @@ function New-NetboxDCIMDevice {
|
||||||
)
|
)
|
||||||
#endregion Parameters
|
#endregion Parameters
|
||||||
|
|
||||||
# if ($null -ne $Device_Role) {
|
|
||||||
# # Validate device role?
|
|
||||||
# }
|
|
||||||
|
|
||||||
# if ($null -ne $Device_Type) {
|
|
||||||
# # Validate device type?
|
|
||||||
# }
|
|
||||||
|
|
||||||
# if ($null -ne $Status) {
|
|
||||||
# $PSBoundParameters.Status = ValidateDCIMChoice -ProvidedValue $Status -DeviceStatus
|
|
||||||
# }
|
|
||||||
|
|
||||||
# if ($null -ne $Face) {
|
|
||||||
# $PSBoundParameters.Face = ValidateDCIMChoice -ProvidedValue $Face -DeviceFace
|
|
||||||
# }
|
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'devices'))
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'devices'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
|
||||||
|
|
@ -51,13 +51,7 @@ function Set-NetboxDCIMDevice {
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
# if ($null -ne $Status) {
|
|
||||||
# $PSBoundParameters.Status = ValidateDCIMChoice -ProvidedValue $Status -DeviceStatus
|
|
||||||
# }
|
|
||||||
|
|
||||||
# if ($null -ne $Face) {
|
|
||||||
# $PSBoundParameters.Face = ValidateDCIMChoice -ProvidedValue $Face -DeviceFace
|
|
||||||
# }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,6 @@ function Add-NetboxDCIMInterface {
|
||||||
[uint16[]]$Tagged_VLANs
|
[uint16[]]$Tagged_VLANs
|
||||||
)
|
)
|
||||||
|
|
||||||
# if ($null -ne $Form_Factor) {
|
|
||||||
# $PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
|
|
||||||
# }
|
|
||||||
|
|
||||||
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
|
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
|
||||||
$PSBoundParameters.Mode = switch ($Mode) {
|
$PSBoundParameters.Mode = switch ($Mode) {
|
||||||
'Access' {
|
'Access' {
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,6 @@ function Add-NetboxDCIMInterfaceConnection {
|
||||||
[uint16]$Interface_B
|
[uint16]$Interface_B
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($null -ne $Connection_Status) {
|
|
||||||
$PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify if both Interfaces exist
|
# Verify if both Interfaces exist
|
||||||
Get-NetboxDCIMInterface -Id $Interface_A -ErrorAction Stop | Out-null
|
Get-NetboxDCIMInterface -Id $Interface_A -ErrorAction Stop | Out-null
|
||||||
Get-NetboxDCIMInterface -Id $Interface_B -ErrorAction Stop | Out-null
|
Get-NetboxDCIMInterface -Id $Interface_B -ErrorAction Stop | Out-null
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,6 @@ function Get-NetboxDCIMInterface {
|
||||||
)
|
)
|
||||||
|
|
||||||
process {
|
process {
|
||||||
if ($null -ne $Form_Factor) {
|
|
||||||
$PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
|
|
||||||
}
|
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interfaces'))
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interfaces'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,6 @@ function Get-NetboxDCIMInterfaceConnection {
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($null -ne $Connection_Status) {
|
|
||||||
$PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interface-connections'))
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interface-connections'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,6 @@ function Set-NetboxDCIMInterface {
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
# if ($null -ne $Form_Factor) {
|
|
||||||
# $PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
|
|
||||||
# }
|
|
||||||
|
|
||||||
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
|
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
|
||||||
$PSBoundParameters.Mode = switch ($Mode) {
|
$PSBoundParameters.Mode = switch ($Mode) {
|
||||||
'Access' {
|
'Access' {
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,6 @@ function Set-NetboxDCIMInterfaceConnection {
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
# if ($null -ne $Connection_Status) {
|
|
||||||
# $PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
|
|
||||||
# }
|
|
||||||
|
|
||||||
if ((@($ID).Count -gt 1) -and ($Interface_A -or $Interface_B)) {
|
if ((@($ID).Count -gt 1) -and ($Interface_A -or $Interface_B)) {
|
||||||
throw "Cannot set multiple connections to the same interface"
|
throw "Cannot set multiple connections to the same interface"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue