-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[sonic-config-engine] Replace os.system, replace yaml.load, remove subprocess with shell=True #12607
Conversation
Signed-off-by: maipbui <maibui@microsoft.com>
….load, remove subprocess with shell=True (sonic-net#12533)" (sonic-net#12616)" This reverts commit 661c467.
Signed-off-by: maipbui <maibui@microsoft.com>
@@ -351,7 +351,7 @@ def main(): | |||
if yaml.__version__ >= "5.1": | |||
additional_data = yaml.full_load(stream) | |||
else: | |||
additional_data = yaml.load(stream) | |||
additional_data = yaml.safe_load(stream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is. Updated in description.
from sonic_py_common.general import getstatusoutput_noshell from sonic_py_common.general import getstatusoutput_noshell, getstatusoutput_noshell_pipe from sonic_py_common.general import getstatusoutput_noshell
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? |
Resolved merge conflicts in the following files manually device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t0.j2 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t1.j2 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t0.j2 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t1.j2 device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t0.j2 device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t1.j2 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t0.j2 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t1.j2 src/sonic-config-engine/tests/test_j2files.py Related work items: sonic-net#11864, sonic-net#12585, sonic-net#12607, sonic-net#12619, sonic-net#12626, sonic-net#12707, sonic-net#12714, sonic-net#12729, sonic-net#12733, sonic-net#12736, sonic-net#12750, sonic-net#12751, sonic-net#12755, sonic-net#12757, sonic-net#12758, sonic-net#12760, sonic-net#12761, sonic-net#12769, sonic-net#12783
Signed-off-by: maipbui maibui@microsoft.com
Why I did it
Missing import statement in PR #12533
How I did it
Revert PR 12646
Add import statement
sonic-buildimage/src/sonic-config-engine/tests/test_j2files_t2_chassis_fe.py
Line 8 in 31f7afa
sonic-buildimage/src/sonic-config-engine/tests/test_j2files.py
Line 8 in 31f7afa
sonic-buildimage/src/sonic-config-engine/tests/test_multinpu_cfggen.py
Line 11 in 31f7afa
How to verify it
Pass UT
Which release branch to backport (provide reason below if selected)
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)