Skip to content

[SNMP] Update extension-to-physical-entity-mib.md to add a description about the Entity sensor MIB extension#766

Merged
qiluo-msft merged 2 commits intomasterfrom
keboliu-entity-sensor-mib-extension
Apr 1, 2021
Merged

[SNMP] Update extension-to-physical-entity-mib.md to add a description about the Entity sensor MIB extension#766
qiluo-msft merged 2 commits intomasterfrom
keboliu-entity-sensor-mib-extension

Conversation

@keboliu
Copy link
Copy Markdown
Collaborator

@keboliu keboliu commented Mar 27, 2021

Extend the Entity sensor MIB to include more sensors.
currently, Entity sensor MIB only include the SFP DOM sensors, in this extension, will add below sensors:

  1. the PSU voltage, current, power, temp
  2. Chassis fan speed, PSU fan speed
  3. Thermal sensors avalaible on the switch(ASIC, CPU, Ambt, etc.)

Related PRs:

PR title state context
Extend rfc3433.py to support more Physical Entity Sensor MIB entries GitHub issue/pull request detail GitHub pull request check contexts
[SNMP] Extend snmp test to cover new added phyEntitySensor MIB change GitHub issue/pull request detail GitHub pull request check contexts

To add a description about the Entity sensor MIB extension
@keboliu keboliu changed the title Update extension-to-physical-entity-mib.md to add a description about the Entity sensor MIB extension [SNMP] Update extension-to-physical-entity-mib.md to add a description about the Entity sensor MIB extension Mar 27, 2021
Comment thread doc/snmp/extension-to-physical-entity-mib.md Outdated
Comment thread doc/snmp/extension-to-physical-entity-mib.md Outdated
@jleveque jleveque requested a review from qiluo-msft March 29, 2021 18:25
@jleveque jleveque self-requested a review March 31, 2021 17:38
@jleveque
Copy link
Copy Markdown
Contributor

Looks good to me. @qiluo-msft to review from an SNMP perspective.

@keboliu
Copy link
Copy Markdown
Collaborator Author

keboliu commented Apr 1, 2021

Hi, @jleveque would you please check my update regarding your comments?

@qiluo-msft qiluo-msft merged commit eeebbf6 into master Apr 1, 2021
@qiluo-msft qiluo-msft deleted the keboliu-entity-sensor-mib-extension branch April 1, 2021 17:23
qiluo-msft added a commit to sonic-net/sonic-snmpagent that referenced this pull request May 18, 2021
Extend RFC3433 implementation with:

1. FAN tachometers
2. PSU current sensor
3. PSU voltage sensor
4. PSU power sensor
5. PSU temp sensor
6. Chassis temp sensor

MIB HLD update PR to reflect this change please refer to: sonic-net/SONiC#766

A fix for the LGTM checker

**- How I did it**
1. Refactor sensor data parsing class by adding a base class  BaseSensorData;  inherit  TransceiverSensorData, PSUSensorData, FANSensorData, and ThermalSensorData from it to reduce redundant code.
2. Adding more sensor MIB entry class: PSUTempSensor, PSUVoltageSensor, PSUCurrentSensor, PSUPowerSensor, FANSpeedSensor, and ThermalSensor.
3. Separate MIB update to different functions according to different sensors types: update_xcvr_dom_data, update_psu_sensor_data, update_fan_sensor_data, and update_thermal_sensor_data.
4. Add unit test cases to cover the new added MIB entries.
5. Add lgtm.yaml to fix the LGTM checker.

**- How to verify it**

Manual test and run updated community SNMP test case(sonic-net/sonic-mgmt#3357).
qiluo-msft added a commit to sonic-net/sonic-snmpagent that referenced this pull request May 18, 2021
**- What I did**

Extend RFC3433 implementation with:

1. FAN tachometers
2. PSU current sensor
3. PSU voltage sensor
4. PSU power sensor
5. PSU temp sensor
6. Chassis temp sensor

MIB HLD update PR to reflect this change please refer to: sonic-net/SONiC#766

A fix for the LGTM checker

**- How I did it**
1. Refactor sensor data parsing class by adding a base class  BaseSensorData;  inherit  TransceiverSensorData, PSUSensorData, FANSensorData, and ThermalSensorData from it to reduce redundant code.
2. Adding more sensor MIB entry class: PSUTempSensor, PSUVoltageSensor, PSUCurrentSensor, PSUPowerSensor, FANSpeedSensor, and ThermalSensor.
3. Separate MIB update to different functions according to different sensors types: update_xcvr_dom_data, update_psu_sensor_data, update_fan_sensor_data, and update_thermal_sensor_data.
4. Add unit test cases to cover the new added MIB entries.
5. Add lgtm.yaml to fix the LGTM checker.

**- How to verify it**

Manual test and run updated community SNMP test case(sonic-net/sonic-mgmt#3357).
ssithaia-ebay pushed a commit to ssithaia-ebay/sonic-snmpagent that referenced this pull request May 23, 2025
**- What I did**

Extend RFC3433 implementation with:

1. FAN tachometers
2. PSU current sensor
3. PSU voltage sensor
4. PSU power sensor
5. PSU temp sensor
6. Chassis temp sensor

MIB HLD update PR to reflect this change please refer to: sonic-net/SONiC#766

A fix for the LGTM checker

**- How I did it**
1. Refactor sensor data parsing class by adding a base class  BaseSensorData;  inherit  TransceiverSensorData, PSUSensorData, FANSensorData, and ThermalSensorData from it to reduce redundant code.
2. Adding more sensor MIB entry class: PSUTempSensor, PSUVoltageSensor, PSUCurrentSensor, PSUPowerSensor, FANSpeedSensor, and ThermalSensor.
3. Separate MIB update to different functions according to different sensors types: update_xcvr_dom_data, update_psu_sensor_data, update_fan_sensor_data, and update_thermal_sensor_data.
4. Add unit test cases to cover the new added MIB entries.
5. Add lgtm.yaml to fix the LGTM checker.

**- How to verify it**

Manual test and run updated community SNMP test case(sonic-net/sonic-mgmt#3357).
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.

3 participants