Increment version to 1.3.2

This commit is contained in:
Ben Claussen 2021-03-30 11:00:53 -04:00
parent 5fc0a8e9fa
commit 5a23e75512
3 changed files with 168 additions and 156 deletions

View file

@ -3,7 +3,7 @@
#
# Generated by: Ben Claussen
#
# Generated on: 2021-03-25
# Generated on: 2021-03-30
#
@{
@ -12,7 +12,7 @@
RootModule = 'NetboxPS.psm1'
# Version number of this module.
ModuleVersion = '1.3.0'
ModuleVersion = '1.3.2'
# Supported PSEditions
# CompatiblePSEditions = @()

View file

@ -3,7 +3,7 @@
#
# Generated by: Ben Claussen
#
# Generated on: 2021-03-25
# Generated on: 2021-03-30
#
@{
@ -12,7 +12,7 @@
RootModule = 'NetboxPS.psm1'
# Version number of this module.
ModuleVersion = '1.3.0'
ModuleVersion = '1.3.2'
# Supported PSEditions
# CompatiblePSEditions = @()

View file

@ -1696,7 +1696,7 @@ function Get-NetboxIPAMAddress {
param
(
[Parameter(ParameterSetName = 'Query',
Position = 0)]
Position = 0)]
[string]$Address,
[Parameter(ParameterSetName = 'ByID')]
@ -1888,7 +1888,7 @@ function Get-NetboxIPAMAggregate {
function Get-NetboxIPAMAvailableIP {
<#
<#
.SYNOPSIS
A convenience method for returning available IP addresses within a prefix
@ -1919,23 +1919,25 @@ function Get-NetboxIPAMAvailableIP {
param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)]
ValueFromPipelineByPropertyName = $true)]
[Alias('Id')]
[uint16]$Prefix_ID,
[int]$Prefix_ID,
[Alias('NumberOfIPs')]
[uint16]$Limit,
[int]$Limit,
[switch]$Raw
)
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'prefixes', $Prefix_ID, 'available-ips'))
process {
$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'
$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
}
}
#endregion
@ -3203,7 +3205,7 @@ function New-NetboxDCIMDevice {
function New-NetboxIPAMAddress {
<#
<#
.SYNOPSIS
Create a new IP address to Netbox
@ -3237,6 +3239,9 @@ function New-NetboxIPAMAddress {
.PARAMETER Description
Description of IP address
.PARAMETER Dns_name
DNS Name of IP address (example : netbox.example.com)
.PARAMETER Force
Do not prompt for confirmation to create IP.
@ -3251,55 +3256,59 @@ function New-NetboxIPAMAddress {
#>
[CmdletBinding(ConfirmImpact = 'Low',
SupportsShouldProcess = $true)]
SupportsShouldProcess = $true)]
[OutputType([pscustomobject])]
param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)]
ValueFromPipelineByPropertyName = $true)]
[string]$Address,
[object]$Status = 'Active',
[uint16]$Tenant,
[int]$Tenant,
[uint16]$VRF,
[int]$VRF,
[object]$Role,
[uint16]$NAT_Inside,
[int]$NAT_Inside,
[hashtable]$Custom_Fields,
[uint16]$Interface,
[int]$Interface,
[string]$Description,
[string]$Dns_name,
[switch]$Force,
[switch]$Raw
)
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-addresses'))
$Method = 'POST'
process {
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-addresses'))
$Method = 'POST'
# # Value validation
# $ModelDefinition = GetModelDefinitionFromURIPath -Segments $Segments -Method $Method
# $EnumProperties = GetModelEnumProperties -ModelDefinition $ModelDefinition
#
# foreach ($Property in $EnumProperties.Keys) {
# if ($PSBoundParameters.ContainsKey($Property)) {
# Write-Verbose "Validating property [$Property] with value [$($PSBoundParameters.$Property)]"
# $PSBoundParameters.$Property = ValidateValue -ModelDefinition $ModelDefinition -Property $Property -ProvidedValue $PSBoundParameters.$Property
# }
# }
#
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
# # Value validation
# $ModelDefinition = GetModelDefinitionFromURIPath -Segments $Segments -Method $Method
# $EnumProperties = GetModelEnumProperties -ModelDefinition $ModelDefinition
#
# foreach ($Property in $EnumProperties.Keys) {
# if ($PSBoundParameters.ContainsKey($Property)) {
# Write-Verbose "Validating property [$Property] with value [$($PSBoundParameters.$Property)]"
# $PSBoundParameters.$Property = ValidateValue -ModelDefinition $ModelDefinition -Property $Property -ProvidedValue $PSBoundParameters.$Property
# }
# }
#
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
$URI = BuildNewURI -Segments $URIComponents.Segments
if ($Force -or $PSCmdlet.ShouldProcess($Address, 'Create new IP address')) {
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
if ($Force -or $PSCmdlet.ShouldProcess($Address, 'Create new IP address')) {
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
}
}
}
@ -3750,7 +3759,7 @@ function Remove-NetboxDCIMInterfaceConnection {
#>
function Remove-NetboxIPAMAddress {
<#
<#
.SYNOPSIS
Remove an IP address from Netbox
@ -3771,12 +3780,12 @@ function Remove-NetboxIPAMAddress {
#>
[CmdletBinding(ConfirmImpact = 'High',
SupportsShouldProcess = $true)]
SupportsShouldProcess = $true)]
param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id,
ValueFromPipelineByPropertyName = $true)]
[int[]]$Id,
[switch]$Force
)
@ -4246,24 +4255,24 @@ function Set-NetboxHostName {
function Set-NetboxIPAMAddress {
[CmdletBinding(ConfirmImpact = 'Medium',
SupportsShouldProcess = $true)]
SupportsShouldProcess = $true)]
param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id,
ValueFromPipelineByPropertyName = $true)]
[int[]]$Id,
[string]$Address,
[string]$Status,
[uint16]$Tenant,
[int]$Tenant,
[uint16]$VRF,
[int]$VRF,
[object]$Role,
[uint16]$NAT_Inside,
[int]$NAT_Inside,
[hashtable]$Custom_Fields,
@ -4274,6 +4283,8 @@ function Set-NetboxIPAMAddress {
[string]$Description,
[string]$Dns_name,
[switch]$Force
)
@ -4303,7 +4314,8 @@ function Set-NetboxIPAMAddress {
if ($PSBoundParameters.ContainsKey('Assigned_Object_Type') -or $PSBoundParameters.ContainsKey('Assigned_Object_Id')) {
if ((-not [string]::IsNullOrWhiteSpace($Assigned_Object_Id)) -and [string]::IsNullOrWhiteSpace($Assigned_Object_Type)) {
throw "Assigned_Object_Type is required when specifying Assigned_Object_Id"
} elseif ((-not [string]::IsNullOrWhiteSpace($Assigned_Object_Type)) -and [string]::IsNullOrWhiteSpace($Assigned_Object_Id)) {
}
elseif ((-not [string]::IsNullOrWhiteSpace($Assigned_Object_Type)) -and [string]::IsNullOrWhiteSpace($Assigned_Object_Id)) {
throw "Assigned_Object_Id is required when specifying Assigned_Object_Type"
}
}