Skip to content

Conversation

@huyc-arista
Copy link
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Currently running a disruptive detail does nothing even when --disruptive flag was specified due to the requested detail e.g psu(disruptive) not matching any handler in DETAIL_FUNCTIONS.

[root@vpr414 admin]# showtech --details "psu(disruptive)" --disruptive
I0115 16:28:20.640184  6834 PlatformNameLib.cpp:80] Platform name read from cache: MERU800BIA
[root@vpr414 admin]#

We need to trim "(disruptive)" suffix from detail string before looking up the appropriate handler in DETAIL_FUNCTIONS.

Test Plan

Running a disruptive detail calls the appropriate handler

[root@vpr414 admin]# showtech --details "psu(disruptive)" --disruptive
I0115 16:11:40.513118  6839 PlatformNameLib.cpp:80] Platform name read from cache: MERU800BIA
##### PSU Information #####
#### PSU Details /run/devmap/sensors/PSU1_PMBUS ####
Extracted i2c bus: 23, device address: 0x0058
I0115 16:11:40.513341  6839 I2cDevIo.cpp:86] Creating I2cRdWrIo for /dev/i2c-23
MFR_ID: Delta
MFR_MODEL: ECD15020056
MFR_REVISION: 03
...

Running a disruptive detail without --disruptive is guarded

[root@vpr414 admin]# showtech --details "psu(disruptive)"
I0115 16:12:07.910210  6844 PlatformNameLib.cpp:80] Platform name read from cache: MERU800BIA
##### Skipping: PSU(Dirsuptive), in non-disruptive mode #####

@meta-cla meta-cla bot added the CLA Signed label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant