replaced hardcoded text by enums in some functions
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function Get-Tag {
|
||||
[CmdletBinding(DefaultParameterSetName="NoParams")]
|
||||
[OutputType('tag')]
|
||||
[OutputType({[types]::tag})]
|
||||
param (
|
||||
[parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByID")]
|
||||
[ValidateScript({ $_ -match "^\d+$" })]
|
||||
@@ -9,14 +9,18 @@ function Get-Tag {
|
||||
$Id,
|
||||
[parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByAddressObject")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ps.ipam.address]
|
||||
$InputObject
|
||||
[PS.IPAM.Address]
|
||||
$AddressObject,
|
||||
[parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="BySubnetObject")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[PS.IPAM.Subnetwork]
|
||||
$SubnetObject
|
||||
)
|
||||
process {
|
||||
$_params = @{
|
||||
Controller = "addresses"
|
||||
Method = "GET"
|
||||
Type = "tag"
|
||||
Controller = [controllers]::addresses
|
||||
Method = [methods]::GET
|
||||
Type = [types]::tag
|
||||
}
|
||||
$_identifiers = @("tags")
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
|
||||
Reference in New Issue
Block a user