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

adding test plan for PMON enhancements for chassis #2695

Merged
merged 3 commits into from Jan 15, 2021

Conversation

rawal01
Copy link
Contributor

@rawal01 rawal01 commented Dec 22, 2020

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

How did you do it?

Based on the code changes in the associated PRs:
Configure and show for platform chassis_modules #1145
CHASSIS_STATE_DB on control-card for chassis state #395
PSUd changes to compute power-budget for Modular chassis #104
Introduce APIs for modular chassis support #124
Common power consumption and supply APIs for modular chassis #136
Thermalctld APIs for recording min and max temp #131
Modular Chassis - Midplane monitoring APIs #148
Modular-Chassis: Show midplane status #1267

How did you verify/test it?

N/A

Any platform specific information?

This is only applicable for distributed VoQ systems

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

Only T2 topology as mentioned in PR #2638

The test cases for API are grouped based on test case modules:

  • All tests for api in module_base may be added to test_module.py under api folder
  • All tests for chassis_base may be added to test_chassis.py under api folder
  • All tests for psu_base may be added to test_psu.py under api folder
  • All tests for thermal_base may be added to test_thermal under api folder
  • All tests for fan_drawer may be added to test_fan_drawer.py under api folder

Documentation

@shubav
Copy link
Contributor

shubav commented Dec 22, 2020

@yxieca @jleveque, could you kindly review this?

@yxieca yxieca requested a review from jleveque December 22, 2020 20:17
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
docs/testplan/PMON-Chassis-Enhancements-test-plan.md Outdated Show resolved Hide resolved
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test plan seems sound to me and the document looks good.

@yxieca: Any comments?

@wangxin wangxin merged commit 15cf0c0 into sonic-net:master Jan 15, 2021
wangxin pushed a commit that referenced this pull request Apr 1, 2021
…run on chassis (#2985)

What is the motivation for this PR?
Add new test cases for api for test plan introduced by PR #2695 #2695 (refer to sections 2 to 6)
Need to run existing api tests against a Sonice chassis but all of the tests were using duthost and hence will always run one of duthost of chassis i.e supervisor or line card. Converted these tests to use the enum_* fixture per hwsku for dut selection. Instead of running gather facts as fixture get facts within compare function for selected duthost.

How did you do it?
Following changes made to api helper files in folder sonic-mgmt/tests/common/helpers/platform_api/
chassis.py:
add new api calls: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

fan_drawer.py:
add new api call: get_maximum_consumed_power

module.py:
add new api calls: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

psu.py:
add new api calls: get_maximum_supplied_power, set_status_master_led, get_status_master_led

thermal.py:
add new api calls: get_minimum_recorded, get_maximum_recorded
changes maded to api tests to support Sonic Chassis and add tests for new apis:

conftest.py:
changes to run tests on  Sonic chassis
change  plaftorm_api_conn to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level, 
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change start_platform_service  to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level,
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change in stop_platform_api_service: to support on all duts where the service was started
for all test modules under api these are common changes :
Remove gather_facts fixture and get facts within compare_value_with_platform_facts per duthost from test
changes changes to run tests on Sonic chassis, Replace duthost with duthosts and enum_rand_one_per_hwsku_hostname for multidut environment for all tests

other changes per module:

test_chassis.py:
add tests for new apis for chassis: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

test_component.py:
remove range since image_list is list for image in range(image_list) 

test_fan_drawer.py:
add test for new apis for fan_drawer: get_maximum_consumed_power

test_module.py
add tests for new apis for module_base: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

test_psu.py
changes changes to run tests on  Sonic chassis,
add tests for new apis: get_maximum_supplied_power, set_status_master_led, get_status_master_led

test_thermal.py
changes changes to run tests on  Sonic chassis, 
add tests for new apis for thermal: get_minimum_recorded, get_maximum_recorded

How did you verify/test it?
Validated the modified tests against chassis.
nirmalya-keysight pushed a commit to nirmalya-keysight/sonic-mgmt that referenced this pull request Apr 5, 2021
…run on chassis (sonic-net#2985)

What is the motivation for this PR?
Add new test cases for api for test plan introduced by PR sonic-net#2695 sonic-net#2695 (refer to sections 2 to 6)
Need to run existing api tests against a Sonice chassis but all of the tests were using duthost and hence will always run one of duthost of chassis i.e supervisor or line card. Converted these tests to use the enum_* fixture per hwsku for dut selection. Instead of running gather facts as fixture get facts within compare function for selected duthost.

How did you do it?
Following changes made to api helper files in folder sonic-mgmt/tests/common/helpers/platform_api/
chassis.py:
add new api calls: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

fan_drawer.py:
add new api call: get_maximum_consumed_power

module.py:
add new api calls: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

psu.py:
add new api calls: get_maximum_supplied_power, set_status_master_led, get_status_master_led

thermal.py:
add new api calls: get_minimum_recorded, get_maximum_recorded
changes maded to api tests to support Sonic Chassis and add tests for new apis:

conftest.py:
changes to run tests on  Sonic chassis
change  plaftorm_api_conn to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level, 
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change start_platform_service  to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level,
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change in stop_platform_api_service: to support on all duts where the service was started
for all test modules under api these are common changes :
Remove gather_facts fixture and get facts within compare_value_with_platform_facts per duthost from test
changes changes to run tests on Sonic chassis, Replace duthost with duthosts and enum_rand_one_per_hwsku_hostname for multidut environment for all tests

other changes per module:

test_chassis.py:
add tests for new apis for chassis: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

test_component.py:
remove range since image_list is list for image in range(image_list) 

test_fan_drawer.py:
add test for new apis for fan_drawer: get_maximum_consumed_power

test_module.py
add tests for new apis for module_base: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

test_psu.py
changes changes to run tests on  Sonic chassis,
add tests for new apis: get_maximum_supplied_power, set_status_master_led, get_status_master_led

test_thermal.py
changes changes to run tests on  Sonic chassis, 
add tests for new apis for thermal: get_minimum_recorded, get_maximum_recorded

How did you verify/test it?
Validated the modified tests against chassis.
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
…run on chassis (sonic-net#2985)

What is the motivation for this PR?
Add new test cases for api for test plan introduced by PR sonic-net#2695 sonic-net#2695 (refer to sections 2 to 6)
Need to run existing api tests against a Sonice chassis but all of the tests were using duthost and hence will always run one of duthost of chassis i.e supervisor or line card. Converted these tests to use the enum_* fixture per hwsku for dut selection. Instead of running gather facts as fixture get facts within compare function for selected duthost.

How did you do it?
Following changes made to api helper files in folder sonic-mgmt/tests/common/helpers/platform_api/
chassis.py:
add new api calls: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

fan_drawer.py:
add new api call: get_maximum_consumed_power

module.py:
add new api calls: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

psu.py:
add new api calls: get_maximum_supplied_power, set_status_master_led, get_status_master_led

thermal.py:
add new api calls: get_minimum_recorded, get_maximum_recorded
changes maded to api tests to support Sonic Chassis and add tests for new apis:

conftest.py:
changes to run tests on  Sonic chassis
change  plaftorm_api_conn to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level, 
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change start_platform_service  to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level,
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change in stop_platform_api_service: to support on all duts where the service was started
for all test modules under api these are common changes :
Remove gather_facts fixture and get facts within compare_value_with_platform_facts per duthost from test
changes changes to run tests on Sonic chassis, Replace duthost with duthosts and enum_rand_one_per_hwsku_hostname for multidut environment for all tests

other changes per module:

test_chassis.py:
add tests for new apis for chassis: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

test_component.py:
remove range since image_list is list for image in range(image_list) 

test_fan_drawer.py:
add test for new apis for fan_drawer: get_maximum_consumed_power

test_module.py
add tests for new apis for module_base: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

test_psu.py
changes changes to run tests on  Sonic chassis,
add tests for new apis: get_maximum_supplied_power, set_status_master_led, get_status_master_led

test_thermal.py
changes changes to run tests on  Sonic chassis, 
add tests for new apis for thermal: get_minimum_recorded, get_maximum_recorded

How did you verify/test it?
Validated the modified tests against chassis.
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…run on chassis (sonic-net#2985)

What is the motivation for this PR?
Add new test cases for api for test plan introduced by PR sonic-net#2695 sonic-net#2695 (refer to sections 2 to 6)
Need to run existing api tests against a Sonice chassis but all of the tests were using duthost and hence will always run one of duthost of chassis i.e supervisor or line card. Converted these tests to use the enum_* fixture per hwsku for dut selection. Instead of running gather facts as fixture get facts within compare function for selected duthost.

How did you do it?
Following changes made to api helper files in folder sonic-mgmt/tests/common/helpers/platform_api/
chassis.py:
add new api calls: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

fan_drawer.py:
add new api call: get_maximum_consumed_power

module.py:
add new api calls: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

psu.py:
add new api calls: get_maximum_supplied_power, set_status_master_led, get_status_master_led

thermal.py:
add new api calls: get_minimum_recorded, get_maximum_recorded
changes maded to api tests to support Sonic Chassis and add tests for new apis:

conftest.py:
changes to run tests on  Sonic chassis
change  plaftorm_api_conn to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level, 
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change start_platform_service  to support multidut by using duthosts and enum_rand_one_per_hwsku_hostname to select dut at function level,
change from getting ip from eth0 to duthost.mgp_ip to extract ip address for DUT 

change in stop_platform_api_service: to support on all duts where the service was started
for all test modules under api these are common changes :
Remove gather_facts fixture and get facts within compare_value_with_platform_facts per duthost from test
changes changes to run tests on Sonic chassis, Replace duthost with duthosts and enum_rand_one_per_hwsku_hostname for multidut environment for all tests

other changes per module:

test_chassis.py:
add tests for new apis for chassis: get_module_index, get_supervisor_slot, get_my_slot, is_modular_chassis

test_component.py:
remove range since image_list is list for image in range(image_list) 

test_fan_drawer.py:
add test for new apis for fan_drawer: get_maximum_consumed_power

test_module.py
add tests for new apis for module_base: get_description,	get_slot, get_type,	get_oper_status, get_midplane_ip, 
is_midplane_reachable, get_maximum_consumed_power, reboot, set_admin_state

test_psu.py
changes changes to run tests on  Sonic chassis,
add tests for new apis: get_maximum_supplied_power, set_status_master_led, get_status_master_led

test_thermal.py
changes changes to run tests on  Sonic chassis, 
add tests for new apis for thermal: get_minimum_recorded, get_maximum_recorded

How did you verify/test it?
Validated the modified tests against chassis.
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.

None yet

4 participants