mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
Update version to 1.7.2
This commit is contained in:
parent
5d6fb23e91
commit
441b06eb04
3 changed files with 262 additions and 313 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-02-24
|
# Generated on: 2023-03-10
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
RootModule = 'NetboxPS.psm1'
|
RootModule = 'NetboxPS.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '1.7.1'
|
ModuleVersion = '1.7.2'
|
||||||
|
|
||||||
# Supported PSEditions
|
# Supported PSEditions
|
||||||
# CompatiblePSEditions = @()
|
# CompatiblePSEditions = @()
|
||||||
|
|
@ -102,7 +102,7 @@ FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnectio
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
||||||
'Set-NetboxVirtualMachineInterface'
|
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
|
||||||
|
|
||||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||||
CmdletsToExport = '*'
|
CmdletsToExport = '*'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-02-24
|
# Generated on: 2023-03-10
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
RootModule = 'NetboxPS.psm1'
|
RootModule = 'NetboxPS.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '1.7.1'
|
ModuleVersion = '1.7.2'
|
||||||
|
|
||||||
# Supported PSEditions
|
# Supported PSEditions
|
||||||
# CompatiblePSEditions = @()
|
# CompatiblePSEditions = @()
|
||||||
|
|
@ -102,7 +102,7 @@ FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnectio
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
||||||
'Set-NetboxVirtualMachineInterface'
|
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
|
||||||
|
|
||||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||||
CmdletsToExport = '*'
|
CmdletsToExport = '*'
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,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' {
|
||||||
|
|
@ -116,10 +112,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
|
||||||
|
|
@ -1497,10 +1489,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'
|
||||||
|
|
@ -1659,10 +1647,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
|
||||||
|
|
@ -1698,10 +1682,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'
|
||||||
|
|
@ -3590,22 +3570,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
|
||||||
|
|
@ -4687,13 +4651,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 {
|
||||||
|
|
@ -4761,10 +4719,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' {
|
||||||
|
|
@ -4863,10 +4817,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"
|
||||||
}
|
}
|
||||||
|
|
@ -5347,20 +5297,19 @@ function SetupNetboxConfigVariable {
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region File ThrowNetboxRESTError.ps1
|
#region File Test-NetboxAPIConnected.ps1
|
||||||
|
|
||||||
<#
|
|
||||||
.NOTES
|
function Test-NetboxAPIConnected {
|
||||||
===========================================================================
|
[CmdletBinding()]
|
||||||
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
|
param ()
|
||||||
Created on: 3/26/2020 14:25
|
|
||||||
Created by: Claussen
|
$script:NetboxConfig.Connected
|
||||||
Organization: NEOnet
|
}
|
||||||
Filename: ThrowNetboxRESTError.ps1
|
|
||||||
===========================================================================
|
#endregion
|
||||||
.DESCRIPTION
|
|
||||||
A description of the file.
|
#region File ThrowNetboxRESTError.ps1
|
||||||
#>
|
|
||||||
|
|
||||||
|
|
||||||
function ThrowNetboxRESTError {
|
function ThrowNetboxRESTError {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue