Commit f40026a
authored
fix(admin-cli): show effective NMX-C state (#5800)
`switch show` currently prints only the persisted legacy NMX-C flag.
When RMS selects a primary switch, that can report `false` even though
hardware health treats NMX-C as enabled.
This change labels the persisted value as configured and displays the
effective value using the same `config.enable_nmxc || switch.is_primary`
expression as hardware health.
## Related issues
Fixes #5799
## Type of Change
- [ ] **Add** - New feature or capability
- [ ] **Change** - Changes in existing functionality
- [x] **Fix** - Bug fixes
- [ ] **Remove** - Removed features or deprecated functionality
- [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.)
## Breaking Changes
- [ ] **This PR contains breaking changes**
## Testing
- [x] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] No testing required (docs, internal refactor, etc.)
`PROTOC=/data/NICo/.tools/protoc-28.3/bin/protoc cargo test -p
nico-admin-cli` (255 passed)
## Additional Notes
The implementation and regression assertion are contained in the
existing switch-show source file; no API or database change is required.
Signed-off-by: Joseph Shifflett <jshifflett@nvidia.com>1 parent 4858dd7 commit f40026a
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
| |||
490 | 495 | | |
491 | 496 | | |
492 | 497 | | |
493 | | - | |
| 498 | + | |
494 | 499 | | |
495 | 500 | | |
496 | 501 | | |
| |||
513 | 518 | | |
514 | 519 | | |
515 | 520 | | |
| 521 | + | |
516 | 522 | | |
| 523 | + | |
| 524 | + | |
517 | 525 | | |
518 | 526 | | |
519 | 527 | | |
| |||
0 commit comments