Update version to 1.7.2

This commit is contained in:
Ben Claussen 2023-03-10 14:42:39 -05:00
parent 5d6fb23e91
commit 441b06eb04
3 changed files with 262 additions and 313 deletions

View file

@ -3,7 +3,7 @@
#
# Generated by: Ben Claussen
#
# Generated on: 2023-02-24
# Generated on: 2023-03-10
#
@{
@ -12,7 +12,7 @@
RootModule = 'NetboxPS.psm1'
# Version number of this module.
ModuleVersion = '1.7.1'
ModuleVersion = '1.7.2'
# Supported PSEditions
# CompatiblePSEditions = @()
@ -102,7 +102,7 @@ FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnectio
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
'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.
CmdletsToExport = '*'

View file

@ -3,7 +3,7 @@
#
# Generated by: Ben Claussen
#
# Generated on: 2023-02-24
# Generated on: 2023-03-10
#
@{
@ -12,7 +12,7 @@
RootModule = 'NetboxPS.psm1'
# Version number of this module.
ModuleVersion = '1.7.1'
ModuleVersion = '1.7.2'
# Supported PSEditions
# CompatiblePSEditions = @()
@ -102,7 +102,7 @@ FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnectio
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
'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.
CmdletsToExport = '*'

View file

@ -38,10 +38,6 @@ function Add-NetboxDCIMInterface {
[uint16[]]$Tagged_VLANs
)
# if ($null -ne $Form_Factor) {
# $PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
# }
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
$PSBoundParameters.Mode = switch ($Mode) {
'Access' {
@ -116,10 +112,6 @@ function Add-NetboxDCIMInterfaceConnection {
[uint16]$Interface_B
)
if ($null -ne $Connection_Status) {
$PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
}
# Verify if both Interfaces exist
Get-NetboxDCIMInterface -Id $Interface_A -ErrorAction Stop | Out-null
Get-NetboxDCIMInterface -Id $Interface_B -ErrorAction Stop | Out-null
@ -1497,10 +1489,6 @@ function Get-NetboxDCIMDevice {
#endregion Parameters
process {
if ($null -ne $Status) {
$PSBoundParameters.Status = ValidateDCIMChoice -ProvidedValue $Status -DeviceStatus
}
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'devices'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
@ -1659,10 +1647,6 @@ function Get-NetboxDCIMInterface {
)
process {
if ($null -ne $Form_Factor) {
$PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
}
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interfaces'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
@ -1698,10 +1682,6 @@ function Get-NetboxDCIMInterfaceConnection {
[switch]$Raw
)
if ($null -ne $Connection_Status) {
$PSBoundParameters.Connection_Status = ValidateDCIMChoice -ProvidedValue $Connection_Status -InterfaceConnectionStatus
}
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interface-connections'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
@ -3590,22 +3570,6 @@ function New-NetboxDCIMDevice {
)
#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'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
@ -4687,13 +4651,7 @@ function Set-NetboxDCIMDevice {
)
begin {
# if ($null -ne $Status) {
# $PSBoundParameters.Status = ValidateDCIMChoice -ProvidedValue $Status -DeviceStatus
# }
# if ($null -ne $Face) {
# $PSBoundParameters.Face = ValidateDCIMChoice -ProvidedValue $Face -DeviceFace
# }
}
process {
@ -4761,10 +4719,6 @@ function Set-NetboxDCIMInterface {
)
begin {
# if ($null -ne $Form_Factor) {
# $PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
# }
if (-not [System.String]::IsNullOrWhiteSpace($Mode)) {
$PSBoundParameters.Mode = switch ($Mode) {
'Access' {
@ -4863,10 +4817,6 @@ function Set-NetboxDCIMInterfaceConnection {
)
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)) {
throw "Cannot set multiple connections to the same interface"
}
@ -5347,20 +5297,19 @@ function SetupNetboxConfigVariable {
#endregion
#region File ThrowNetboxRESTError.ps1
#region File Test-NetboxAPIConnected.ps1
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
Created on: 3/26/2020 14:25
Created by: Claussen
Organization: NEOnet
Filename: ThrowNetboxRESTError.ps1
===========================================================================
.DESCRIPTION
A description of the file.
#>
function Test-NetboxAPIConnected {
[CmdletBinding()]
param ()
$script:NetboxConfig.Connected
}
#endregion
#region File ThrowNetboxRESTError.ps1
function ThrowNetboxRESTError {