Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SNMP] Extend snmp test to cover new added phyEntitySensor MIB change #3357

Merged
merged 6 commits into from
May 18, 2021

Conversation

keboliu
Copy link
Contributor

@keboliu keboliu commented Apr 18, 2021

Description of PR

Summary:
Extend test_snmp_phy_entity to cover new add phyEntitySensor MIB entries in PR sonic-net/sonic-snmpagent#211

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

cover new added MIB entries in physical entity sensor MIB(RFC3433)

How did you do it?

Extend current test cases to check the correctness of the newly added MIB entries.

How did you verify/test it?

Run changed test_snmp_phy_entity

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

N/A

Documentation

sonic-net/SONiC#766

…pport

Signed-off-by: Kebo Liu <kebol@nvidia.com>
@anshuv-mfst
Copy link

Hi @yxieca - Could you please assign reviewer, thanks.

@liat-grozovik
Copy link
Collaborator

@keboliu please confirm test can still run on 202012 with latest code and without this feature included.

@keboliu
Copy link
Contributor Author

keboliu commented May 6, 2021

@keboliu please confirm test can still run on 202012 with latest code and without this feature included.

yes, the new test will skip version 202012 and lower.

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).
@wangxin wangxin merged commit 4900b2e into sonic-net:master May 18, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…sonic-net#3357)

Extend test_snmp_phy_entity to cover new add phyEntitySensor MIB entries in PR sonic-net/sonic-snmpagent#211

What is the motivation for this PR?
cover new added MIB entries in physical entity sensor MIB(RFC3433)

How did you do it?
Extend current test cases to check the correctness of the newly added MIB entries.

How did you verify/test it?
Run changed test_snmp_phy_entity

Signed-off-by: Kebo Liu <kebol@nvidia.com>
@keboliu keboliu deleted the snmp-extension branch October 28, 2023 03:38
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.

5 participants