Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: free pool health #32

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions VMware.CloudFoundation.Reporting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -5592,7 +5592,7 @@ Function Request-SddcManagerFreePool {
.DESCRIPTION
The Request-SddcManagerFreePool cmdlet returns status of the ESXi hosts in the free pool. The cmdlet connects
to SDDC Manager using the -server, -user, and -password values:
- Validates that network connectivity and authencitation is possible o the SDDC Manager instance
- Validates that network connectivity and authentication is possible to the SDDC Manager instance
- Gathers the details for the ESXi hosts in the free pool

.EXAMPLE
Expand Down Expand Up @@ -5654,9 +5654,11 @@ Function Request-SddcManagerFreePool {
foreach ($properties in $licenseManager.Evaluation.Properties) {
if ($properties.key -eq "expirationDate") {
$expirationDate = $properties.value
$expiryDate = [math]::Ceiling((([DateTime]$expirationDate) - (Get-Date)).TotalDays)
} elseif ($properties.key -eq "diagnostic") {
$expiryDate = 0
}
}
$expiryDate = [math]::Ceiling((([DateTime]$expirationDate) - (Get-Date)).TotalDays)
if ($expiryDate -gt "0") {
$alert = "GREEN"
$message = "No expired license running on the host."
Expand All @@ -5665,7 +5667,7 @@ Function Request-SddcManagerFreePool {
$message = "License installed on the ESXi host has expired."
}
$elementObject = New-Object -TypeName psobject
$elementObject | Add-Member -NotePropertyName 'Component' -NotePropertyValue 'Evaluation License'
$elementObject | Add-Member -NotePropertyName 'Component' -NotePropertyValue 'ESXi License'
$elementObject | Add-Member -NotePropertyName 'ESXi FQDN' -NotePropertyValue $esxiHost.fqdn
$elementObject | Add-Member -NotePropertyName 'Alert' -NotePropertyValue $alert
$elementObject | Add-Member -NotePropertyName 'Message' -NotePropertyValue $message
Expand Down