Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sammcgeown committed Feb 7, 2018
1 parent ab143dd commit 9f9da50
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions module/PowerNSX.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8954,11 +8954,13 @@ function Get-NsxSegmentIdRange {

$URI = "/api/2.0/vdn/config/segments"
$response = invoke-nsxrestmethod -method "get" -uri $URI -connection $connection
switch ( $PSCmdlet.ParameterSetName ) {
"Name" { $response.segmentRanges.segmentRange | where-object { $_.name -eq $Name } }
"UniversalOnly" { $response.segmentRanges.segmentRange | where-object { $_.isUniversal -eq "true" } }
"LocalOnly" { $response.segmentRanges.segmentRange | where-object { $_.isUniversal -eq "false" } }
Default { $response.segmentRanges.segmentRange }
if(([bool](($response.segmentRanges).PSobject.Properties.name -match "segmentRange"))){
switch ( $PSCmdlet.ParameterSetName ) {
"Name" { $response.segmentRanges.segmentRange | where-object { $_.name -eq $Name } }
"UniversalOnly" { $response.segmentRanges.segmentRange | where-object { $_.isUniversal -eq "true" } }
"LocalOnly" { $response.segmentRanges.segmentRange | where-object { $_.isUniversal -eq "false" } }
Default { $response.segmentRanges.segmentRange }
}
}
}
}
Expand Down

0 comments on commit 9f9da50

Please sign in to comment.