Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR:14926] Configuring Community SNMP Credentials for SNMP TCs (#15359)
* Configuring Community SNMP Credentials for SNMP TCs (#14926) Description of PR Summary: The PR contains changes to snmp/conftest.py with logic to configure snmp credentials stored in snmp.yml for every host before running any test script. Approach What is the motivation for this PR? If credentials in snmp.yml isn't configured, then the changes in PR configures them before running the tests and restores the original configuration after the TC execution. How did you do it? snmp/conftest.py will now copy the snmp.yml from DUT to UCS (if DUT has snmp.yml) & then it will configure the SNMP credentials for every host via sudo config snmp command. The logic it configures is same as in snmp_yml_to_configdb.py script; where it checks whether the credentials in yml are configured in config_db or not, if the keys are configured but the values are different / the keys are not configured - then it will configure them. Before the test script execution, SNMP is configured, once the execution completes, it reverts the configuration that existed before. How did you verify/test it? Run changes with 202405 image on a T0 setup without snmp credentials configured / with different credentials configured in image and snmp tests passed as expected in all scenarios. co-authorized by: [email protected] * update gu_utils location from one used in master to 202405
- Loading branch information