Commit e4ff323
authored
Improve output generated for Debug-SdnFabricInfrastructure - 2 (#535)
This pull request introduces several improvements and refinements to the
SDN health diagnostics PowerShell module, focusing on severity handling,
summary display flexibility, and transcript management. The most
significant changes are the addition of a new severity level, improved
parameterization for summary output, and adjustments to transcript
handling for clarity and correctness.
**Severity and Health State Handling:**
* Added 'FAILURE' as a valid severity value alongside 'FAIL',
standardized severity mapping to use 'Failure' internally, and updated
all related logic to treat 'FAILURE' as the primary failure state
throughout the health validation and summary reporting.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L296-R310)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L583-R595)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L595-R604)
**Summary Display Control:**
* Introduced a new `SkipSummaryDisplay` switch parameter to the
`Debug-SdnFabricInfrastructure` function, allowing users to optionally
suppress the summary output in the console. Logic was updated to respect
this flag when displaying results.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R361-R362)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L388-R400)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L560-R572)
**Transcript Management:**
* Improved transcript handling by capturing the result of
`Start-Transcript` and `Stop-Transcript` to `$null` to avoid unnecessary
output, and moved the transcript stop and summary message to execute
after all processing, ensuring the transcript captures the entire
session.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L398-R410)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R655-R657)
These changes enhance the flexibility, clarity, and reliability of the
SDN diagnostics script, making it easier to interpret results and
control output during automated or manual runs.
# Change type
- [x] Bug fix (non-breaking change)
- [ ] Code style update (formatting, local variables)
- [ ] New Feature (non-breaking change that adds new functionality
without impacting existing)
- [ ] 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.1 parent 4b1d28d commit e4ff323
1 file changed
+22
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
| |||
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
| 361 | + | |
| 362 | + | |
355 | 363 | | |
356 | 364 | | |
357 | 365 | | |
| |||
385 | 393 | | |
386 | 394 | | |
387 | 395 | | |
388 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
389 | 401 | | |
390 | 402 | | |
391 | 403 | | |
| |||
395 | 407 | | |
396 | 408 | | |
397 | 409 | | |
398 | | - | |
| 410 | + | |
399 | 411 | | |
400 | 412 | | |
401 | 413 | | |
| |||
557 | 569 | | |
558 | 570 | | |
559 | 571 | | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
| 572 | + | |
564 | 573 | | |
565 | 574 | | |
566 | 575 | | |
| |||
580 | 589 | | |
581 | 590 | | |
582 | 591 | | |
583 | | - | |
| 592 | + | |
584 | 593 | | |
585 | 594 | | |
586 | | - | |
| 595 | + | |
587 | 596 | | |
588 | 597 | | |
589 | 598 | | |
| |||
592 | 601 | | |
593 | 602 | | |
594 | 603 | | |
595 | | - | |
| 604 | + | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
| |||
643 | 652 | | |
644 | 653 | | |
645 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
646 | 658 | | |
647 | 659 | | |
648 | 660 | | |
| |||
0 commit comments