Skip to content

Switch PSU Status: "Present" PSUs have no power; fix VC and CX grading - #9

Merged
InterconnectedSystems merged 1 commit into
mainfrom
psu-present-nopower
Oct 16, 2026
Merged

InterconnectedSystems merged 1 commit into
mainfrom
psu-present-nopower

Conversation

@InterconnectedSystems

Copy link
Copy Markdown
Owner

Fixes PSU grading, checked against a live org (23 switches, EX and CX):

  • Present = installed, no power. It was counted as OK. A VC whose members each report present + ok read as Redundant, and so did a switch with ok, present, present. There is now a No power PSU class, and the switch is graded PSU failed / no power.
  • False "Member missing" (from Switch PSU Status: flag VC members that are not reporting #7). Mist's inventory has a virtual chassis row whose serial is the VC MAC. The check counted it as a member that wasn't reporting, and it also compared non-VC chassis serials with module serials. It now uses only real VC members (2 or more), and a switch that sends no module data stays No PSU data.
  • CX modules. PSU modules with no FPC or VC role are pooled into one Chassis. Management modules, line cards and fan trays with no PSUs are skipped. CX6405 is now graded on its 4 PSUs instead of as 13 "members".
  • PSUs are listed in name order.

Live org before → after: 4 false Member missing, 2 unpowered PSU cases graded Redundant → 2 PSU failed / no power, 0 Member missing, CX6405 Redundant.

Tests: 5 new fixtures shaped like the live data; existing tests updated for the chassis row.

🤖 Generated with Claude Code

Checked against a live org:
- Junos "Present" means a PSU is installed but not supplying power. It
  was counted as OK, so a VC member with one unpowered PSU read as
  Redundant. It is now its own "No power" class and grades the switch
  "PSU failed / no power".
- 1.1.2's missing-member check counted Mist's virtual chassis inventory
  row (its serial is the VC MAC) as a member, and compared non-VC
  chassis serials with module serials, so it flagged almost every VC.
  It now uses only real VC members, and skips switches that send no
  module data at all.
- CX switches list PSUs, management modules, line cards and fan trays
  as separate modules. PSUs with no FPC or VC role are now pooled into
  one chassis, and modules without PSUs are skipped.
- PSUs are listed in name order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@InterconnectedSystems
InterconnectedSystems merged commit 2c722ea into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant