Skip to content

Commit

Permalink
fix: vrealize product display name
Browse files Browse the repository at this point in the history
Resolves an issue with the display name of the vRealize Log Insight product name in the vRealize Suite Overview due to an upstream error in the .SYNOPSIS of Get-VCFvRLI in PowerVCF.

This change may allow future versions of the module to adopt the rebranding to Aria Suite ahead of PowerVCF.

Signed-off-by: Ryan Johnson [email protected]
  • Loading branch information
GaryJBlake authored Feb 6, 2023
2 parents a39112b + b649459 commit 2c60e93
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions VMware.CloudFoundation.Reporting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8733,29 +8733,46 @@ Function Request-VrealizeOverview {
$vcfApiCmdlet = @("Get-VCFvRSLCM","Get-VCFWSA","Get-VCFvRLI","Get-VCFvROPS","Get-VCFvRA")
foreach ($apiCmdlet in $vcfApiCmdlet) {
if ((Invoke-Expression $apiCmdlet).status -eq "ACTIVE") {
if ($apiCmdlet -eq "Get-VCFvRSLCM") {$nodeCount = "1" } else { ($nodeCount = ((Invoke-Expression $apiCmdlet).nodes).Count)}
if ($apiCmdlet -eq "Get-VCFvRSLCM") {$nodeCount = "1"} else { ($nodeCount = ((Invoke-Expression $apiCmdlet).nodes).Count)}

if ($apiCmdlet -eq "Get-VCFvRSLCM") {
$product = "vRealize Suite Lifecycle Manager"
}
elseif ($apiCmdlet -eq "Get-VCFWSA") {
$product = "Workspace ONE Access"
}
elseif ($apiCmdlet -eq "Get-VCFvRLI") {
$product = "vRealize Log Insight"
}
elseif ($apiCmdlet -eq "Get-VCFvROPS") {
$product = "vRealize Operations"
}
elseif ($apiCmdlet -eq "Get-VCFvRA") {
$product = "vRealize Automation"
}

$customObject = New-Object -TypeName psobject
$customObject | Add-Member -notepropertyname "vRealize Product" -notepropertyvalue ((Get-Help -Name $apiCmdlet).synopsis -Split ("Get the existing ") | Select-Object -Last 1)
if ($PsBoundParameters.ContainsKey('anonymized')) {
$customObject | Add-Member -notepropertyname "UUID" -notepropertyvalue (Invoke-Expression $apiCmdlet).id
$customObject | Add-Member -NotePropertyName "vRealize Product" -NotePropertyValue $product
if ($PsBoundParameters.ContainsKey("anonymized")) {
$customObject | Add-Member -NotePropertyName "UUID" -NotePropertyValue (Invoke-Expression $apiCmdlet).id
} else {
if ($apiCmdlet -eq "Get-VCFvRSLCM") {
$customObject | Add-Member -notepropertyname "FQDN" -notepropertyvalue (Invoke-Expression $apiCmdlet).fqdn
$customObject | Add-Member -NotePropertyName "FQDN" -NotePropertyValue (Invoke-Expression $apiCmdlet).fqdn
} else {
$customObject | Add-Member -notepropertyname "FQDN" -notepropertyvalue (Invoke-Expression $apiCmdlet).loadBalancerFqdn
$customObject | Add-Member -NotePropertyName "FQDN" -NotePropertyValue (Invoke-Expression $apiCmdlet).loadBalancerFqdn
}
}
$customObject | Add-Member -notepropertyname "Version" -notepropertyvalue (Invoke-Expression $apiCmdlet).version
$customObject | Add-Member -notepropertyname "Status" -notepropertyvalue (Invoke-Expression $apiCmdlet).status
$customObject | Add-Member -notepropertyname "Nodes" -notepropertyvalue $nodeCount
$customObject | Add-Member -NotePropertyName "Version" -NotePropertyValue (Invoke-Expression $apiCmdlet).version
$customObject | Add-Member -NotePropertyName "Status" -NotePropertyValue (Invoke-Expression $apiCmdlet).status
$customObject | Add-Member -NotePropertyName "Nodes" -NotePropertyValue $nodeCount
$allVrealizeObject += $customObject
}
}
$allVrealizeObject
}
}
}
Catch {
Catch {
Debug-ExceptionWriter -object $_
}
}
Expand Down

0 comments on commit 2c60e93

Please sign in to comment.