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: report output failing #217

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## v2.6.2

> Release Date: (unreleased)

Bugfix:

- Updated `Invoke-VcfHealthReport` cmdlet to handle . or - in the report path. [GH-217](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/217)
- Updated `Invoke-VcfAlertReport` cmdlet to handle . or - in the report path. [GH-217](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/217)
- Updated `Invoke-VcfConfigReport` cmdlet to handle . or - in the report path. [GH-217](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/217)
- Updated `Invoke-VcfUpgradePrecheck` cmdlet to handle . or - in the report path. [GH-217](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/217)
- Updated `Invoke-VcfOverviewReport` cmdlet to handle . or - in the report path. [GH-217](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/217)

## v2.6.1

> Release Date: 2024-02-06
Expand Down
2 changes: 1 addition & 1 deletion VMware.CloudFoundation.Reporting.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = '.\VMware.CloudFoundation.Reporting.psm1'

# Version number of this module.
ModuleVersion = '2.6.1.1001'
ModuleVersion = '2.6.2.1000'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
10 changes: 5 additions & 5 deletions VMware.CloudFoundation.Reporting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Function Invoke-VcfHealthReport {
$defaultReport = Start-CreateReportDirectory -path $reportPath -reportType health # Setup Report Location and Report File
if (!(Test-Path -Path $reportPath)) {Write-Warning "Unable to locate report path $reportPath, enter a valid path and try again"; Write-Host ""; Break }
if ($PsBoundParameters.ContainsKey("allDomains")) {
$reportname = $defaultReport.Split('.')[0] + "-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportname = $defaultReport.Split('-health')[0] + "-health-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportData = "<h1>SDDC Manager: $sddcManagerFqdn</h1>"
$workflowMessage = "VMware Cloud Foundation instance ($sddcManagerFqdn)"
$commandSwitch = "-allDomains"
Expand Down Expand Up @@ -501,7 +501,7 @@ Function Invoke-VcfAlertReport {
$defaultReport = Start-CreateReportDirectory -path $reportPath -reportType alert # Setup Report Location and Report File
if (!(Test-Path -Path $reportPath)) {Write-Warning "Unable to locate report path $reportPath, enter a valid path and try again"; Write-Host ""; Break }
if ($PsBoundParameters.ContainsKey("allDomains")) {
$reportname = $defaultReport.Split('.')[0] + "-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportname = $defaultReport.Split('-alert')[0] + "-alert-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportData = "<h1>SDDC Manager: $sddcManagerFqdn</h1>"
$workflowMessage = "VMware Cloud Foundation instance ($sddcManagerFqdn)"
$commandSwitch = "-allDomains"
Expand Down Expand Up @@ -625,7 +625,7 @@ Function Invoke-VcfConfigReport {
$defaultReport = Start-CreateReportDirectory -path $reportPath -reportType config # Setup Report Location and Report File
if (!(Test-Path -Path $reportPath)) {Write-Warning "Unable to locate report path $reportPath, enter a valid path and try again"; Write-Host ""; Break }
if ($PsBoundParameters.ContainsKey("allDomains")) {
$reportname = $defaultReport.Split('.')[0] + "-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportname = $defaultReport.Split('-config')[0] + "-config-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportData = "<h1>SDDC Manager: $sddcManagerFqdn</h1>"
$workflowMessage = "VMware Cloud Foundation instance ($sddcManagerFqdn)"
$commandSwitch = "-allDomains"
Expand Down Expand Up @@ -742,7 +742,7 @@ Function Invoke-VcfUpgradePrecheck {
if (Test-VCFAuthentication -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass) {
$defaultReport = Start-CreateReportDirectory -path $reportPath -reportType upgrade # Setup Report Location and Report File
if (!(Test-Path -Path $reportPath)) {Write-Warning "Unable to locate report path $reportPath, enter a valid path and try again"; Write-Host ""; Break }
$reportname = $defaultReport.Split('.')[0] + "-" + $workloadDomain + ".htm"
$reportname = $defaultReport.Split('-upgrade')[0] + "-upgrade-" + $workloadDomain + ".htm"
$workflowMessage = "Workload Domain ($workloadDomain)"
Start-SetupLogFile -Path $reportPath -ScriptName $MyInvocation.MyCommand.Name # Setup Log Location and Log File
Write-LogMessage -Type INFO -Message "Starting the Process of Running an Upgrade Precheck for $workflowMessage." -Colour Yellow
Expand Down Expand Up @@ -883,7 +883,7 @@ Function Invoke-VcfOverviewReport {
if (Test-VCFAuthentication -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass) {
$defaultReport = Start-CreateReportDirectory -path $reportPath -reportType overview # Setup Report Location and Report File
if (!(Test-Path -Path $reportPath)) {Write-Warning "Unable to locate report path $reportPath, enter a valid path and try again"; Write-Host ""; Break }
$reportname = $defaultReport.Split('.')[0] + "-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$reportname = $defaultReport.Split('-overview')[0] + "-overview-" + $sddcManagerFqdn.Split(".")[0] + ".htm"
$workflowMessage = "VMware Cloud Foundation instance ($sddcManagerFqdn)"
Start-SetupLogFile -Path $reportPath -ScriptName $MyInvocation.MyCommand.Name # Setup Log Location and Log File
Write-LogMessage -Type INFO -Message "Starting the Process of Creating a System Overview Report for $workflowMessage." -Colour Yellow
Expand Down