Address(IPAM): Fix trailing whitespace (with Visual Code Formater)

This commit is contained in:
Alexis La Goutte 2021-03-29 15:51:30 +02:00
parent cfb53cf933
commit 354aeb66d3
5 changed files with 123 additions and 122 deletions

View file

@ -3,7 +3,7 @@
param param
( (
[Parameter(ParameterSetName = 'Query', [Parameter(ParameterSetName = 'Query',
Position = 0)] Position = 0)]
[string]$Address, [string]$Address,
[Parameter(ParameterSetName = 'ByID')] [Parameter(ParameterSetName = 'ByID')]

View file

@ -13,7 +13,7 @@
function Get-NetboxIPAMAvailableIP { function Get-NetboxIPAMAvailableIP {
<# <#
.SYNOPSIS .SYNOPSIS
A convenience method for returning available IP addresses within a prefix A convenience method for returning available IP addresses within a prefix
@ -44,7 +44,7 @@ function Get-NetboxIPAMAvailableIP {
param param
( (
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)] ValueFromPipelineByPropertyName = $true)]
[Alias('Id')] [Alias('Id')]
[uint16]$Prefix_ID, [uint16]$Prefix_ID,

View file

@ -13,7 +13,7 @@
function New-NetboxIPAMAddress { function New-NetboxIPAMAddress {
<# <#
.SYNOPSIS .SYNOPSIS
Create a new IP address to Netbox Create a new IP address to Netbox
@ -61,12 +61,12 @@ function New-NetboxIPAMAddress {
#> #>
[CmdletBinding(ConfirmImpact = 'Low', [CmdletBinding(ConfirmImpact = 'Low',
SupportsShouldProcess = $true)] SupportsShouldProcess = $true)]
[OutputType([pscustomobject])] [OutputType([pscustomobject])]
param param
( (
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)] ValueFromPipelineByPropertyName = $true)]
[string]$Address, [string]$Address,
[object]$Status = 'Active', [object]$Status = 'Active',

View file

@ -12,7 +12,7 @@
#> #>
function Remove-NetboxIPAMAddress { function Remove-NetboxIPAMAddress {
<# <#
.SYNOPSIS .SYNOPSIS
Remove an IP address from Netbox Remove an IP address from Netbox
@ -33,11 +33,11 @@ function Remove-NetboxIPAMAddress {
#> #>
[CmdletBinding(ConfirmImpact = 'High', [CmdletBinding(ConfirmImpact = 'High',
SupportsShouldProcess = $true)] SupportsShouldProcess = $true)]
param param
( (
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)] ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id, [uint16[]]$Id,
[switch]$Force [switch]$Force

View file

@ -14,11 +14,11 @@
function Set-NetboxIPAMAddress { function Set-NetboxIPAMAddress {
[CmdletBinding(ConfirmImpact = 'Medium', [CmdletBinding(ConfirmImpact = 'Medium',
SupportsShouldProcess = $true)] SupportsShouldProcess = $true)]
param param
( (
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)] ValueFromPipelineByPropertyName = $true)]
[uint16[]]$Id, [uint16[]]$Id,
[string]$Address, [string]$Address,
@ -71,7 +71,8 @@ function Set-NetboxIPAMAddress {
if ($PSBoundParameters.ContainsKey('Assigned_Object_Type') -or $PSBoundParameters.ContainsKey('Assigned_Object_Id')) { 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)) { if ((-not [string]::IsNullOrWhiteSpace($Assigned_Object_Id)) -and [string]::IsNullOrWhiteSpace($Assigned_Object_Type)) {
throw "Assigned_Object_Type is required when specifying Assigned_Object_Id" 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" throw "Assigned_Object_Id is required when specifying Assigned_Object_Type"
} }
} }