sonic-buildimage
sonic-buildimage copied to clipboard
[sonic-config-engine] Replace os.system, replace yaml.load, remove subprocess with shell=True
Signed-off-by: maipbui [email protected]
Why I did it
Missing import statement in PR https://github.com/sonic-net/sonic-buildimage/pull/12533
How I did it
Revert PR 12646 Add import statement
- https://github.com/sonic-net/sonic-buildimage/blob/31f7afa92e8d1e353ef2f3b004711dd18c0d94f6/src/sonic-config-engine/tests/test_j2files_t2_chassis_fe.py#L8
- https://github.com/sonic-net/sonic-buildimage/blob/31f7afa92e8d1e353ef2f3b004711dd18c0d94f6/src/sonic-config-engine/tests/test_j2files.py#L8
- https://github.com/sonic-net/sonic-buildimage/blob/31f7afa92e8d1e353ef2f3b004711dd18c0d94f6/src/sonic-config-engine/tests/test_multinpu_cfggen.py#L11
How to verify it
Pass UT
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
This PR looks good to me. Could you dig deeper why the reverted PR was not caught by testcases on Github repo? Do we have test gap?