You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve output generated for Debug-SdnFabricInfrastructure (#534)
This pull request updates the health reporting logic in
`src/modules/SdnDiag.Health.psm1` to standardize the severity
terminology from `WARN` to `WARNING`, improves the health validation
output formatting, and enhances the overall health report summary for
SDN diagnostics. The changes also add color-coded output and a clear
report header/footer for better readability.
**Severity and terminology standardization:**
* Changed all references and logic from `WARN` to `WARNING` for health
test results, including allowed values and result aggregation in all
relevant functions (`New-SdnHealthTest`, `New-SdnRoleHealthReport`,
`New-SdnFabricHealthReport`, and all diagnostic functions).
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L226-R226)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R242-R245)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L261-R262)
[[4]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L519-L531)
[[5]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L656-R728)
[[6]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L724-R796)
[[7]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L770-R842)
[[8]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L1083-R1150)
[[9]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L1380-R1447)
**Reporting and output improvements:**
* Added a severity parameter to `Write-HealthValidationInfo`, which sets
the output color based on severity and displays severity in the report.
Output color is now dynamically set to yellow for `WARNING` and red for
`FAIL`.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L292-R308)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R317-R320)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L320-R335)
[[4]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L557-R630)
* Implemented a formatted report header and footer, and a summary
section showing tested roles, nodes, timestamp, and overall health state
with color coding.
**Logic enhancements:**
* Improved aggregation logic to ensure the worst-case health state is
reflected (FAIL > WARNING > PASS) and summary is displayed accordingly.
**Remediation and messaging:**
* Updated remediation messages for clarity and consistency, especially
in adapter performance settings and DNS resolution failures.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L995-R1062)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L1891-R1958)
These changes make the health reporting more consistent, readable, and
user-friendly for diagnosing SDN environments.
<img width="1306" height="826" alt="image"
src="https://github.com/user-attachments/assets/d8063554-1e29-4244-8bf3-d4cbce6ac6b8"
/>
# Change type
- [x] Bug fix (non-breaking change)
- [ ] Code style update (formatting, local variables)
- [x] New Feature (non-breaking change that adds new functionality
without impacting existing)
- [x] Breaking change (fix or feature that may cause functionality
impact)
- [ ] Other
# Checklist:
- [x] My code follows the style and contribution guidelines of this
project.
- [x] I have tested and validated my code changes.
$sdnHealthTest.Remediation+="Run 'Invoke-SdnRemediationScript -ScriptName 'ConfigureForwardOptimization.ps1' -ArgumentList @{AdapterName='$adapter'; NoRestart=`$false}' on the impacted node to enable Forwarding Optimization."
0 commit comments