first working types
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
function Get-Subnet {
|
||||
[CmdletBinding(DefaultParameterSetName="ByID")]
|
||||
[CmdletBinding(DefaultParameterSetName="NoParams")]
|
||||
[OutputType([PS.IPAM.Subnetwork])]
|
||||
param (
|
||||
[parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByCIDR")]
|
||||
[ValidateScript({[ipaddress] $_.Split("/")[0] -and $_.Split("/")[1] -match "\d{1,2}"})]
|
||||
@@ -52,13 +53,10 @@ function Get-Subnet {
|
||||
$Recurse
|
||||
)
|
||||
process {
|
||||
[string[]]$visiblePropertiesList = @('Id','Subnet','Mask','Description')
|
||||
$visibleProperties = [System.Management.Automation.PSPropertySet]::new('DefaultDisplayPropertySet',$visiblePropertiesList)
|
||||
|
||||
$_params = @{
|
||||
Controller = "subnets"
|
||||
Method = "GET"
|
||||
Type = "subnet"
|
||||
Controller = [PS.IPAM.controllers]::subnets
|
||||
Method = [PS.IPAM.methods]::GET
|
||||
Type = [PS.IPAM.types]::Subnetwork
|
||||
}
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"ByCIDR" {
|
||||
|
||||
Reference in New Issue
Block a user