Fixes
This commit is contained in:
@@ -54,7 +54,7 @@ function Get-Subnet {
|
||||
}
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"ByCIDR" {
|
||||
$_identifiers = @("cidr",$CIDR)
|
||||
$_identifiers = @("cidr",$CIDR); break
|
||||
}
|
||||
"ByID" {
|
||||
$_identifiers = @($Id)
|
||||
@@ -66,25 +66,29 @@ function Get-Subnet {
|
||||
$_identifiers += "slaves"
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
"BySectionId" {
|
||||
$_params.Item("Controller") = "sections"
|
||||
$_sectionId = $SectionId
|
||||
|
||||
$_identifiers = @($_sectionId,"subnets")
|
||||
$_identifiers = @($_sectionId,"subnets")
|
||||
break
|
||||
}
|
||||
"BySectionName" {
|
||||
$_params.Item("Controller") = "sections"
|
||||
$_sectionId = (Get-Section -Name $SectionName).id
|
||||
if (!$_sectionId) { throw "Cannot find section!" }
|
||||
|
||||
$_identifiers = @($_sectionId,"subnets")
|
||||
$_identifiers = @($_sectionId,"subnets")
|
||||
break
|
||||
}
|
||||
"ByVrfId" {
|
||||
$_params.Item("Controller") = "vrf"
|
||||
$_vrfId = $VrfId
|
||||
|
||||
$_identifiers = @($_vrfId,"subnets")
|
||||
break
|
||||
}
|
||||
"ByVlanId" {
|
||||
$_params.Item("Controller") = "vlan"
|
||||
@@ -95,6 +99,7 @@ function Get-Subnet {
|
||||
$_identifiers = @($_vlanId,"subnets")
|
||||
|
||||
if ($_sectionId) { $_identifiers += $_sectionId }
|
||||
break
|
||||
}
|
||||
"ByVlanNumber" {
|
||||
$_params.Item("Controller") = "vlan"
|
||||
@@ -111,6 +116,7 @@ function Get-Subnet {
|
||||
$_identifiers = @($_vlanId,"subnets")
|
||||
|
||||
if ($_sectionId) { $_identifiers += $_sectionId }
|
||||
break
|
||||
}
|
||||
}
|
||||
$_params.Add("Identifiers",$_identifiers)
|
||||
|
||||
Reference in New Issue
Block a user