-
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-cfggen]: Update UT to add port lanes #10362
Conversation
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
<AlternateSpeeds i:nil="true"/> | ||
<EnableFlowControl>true</EnableFlowControl> | ||
<Index>1</Index> | ||
<InterfaceName>Ethernet4</InterfaceName> |
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.
There's no speed for these ports.
We shouldn't update device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S/port_config.ini, so I update this xml.
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.
If port speed is not mandatory, no need to fix?
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.
I have removed this change
Do you need to change this line at the same time? In reply to: 1084154358 In reply to: 1084154358 In reply to: 1084154358 Refers to: src/sonic-config-engine/tests/sample_graph.xml:115 in f313124. [](commit_id = f313124, deletion_comment = False) |
src/sonic-config-engine/tests/multi_npu_data/sample_port_config.ini
Outdated
Show resolved
Hide resolved
output = self.run_script(argument) | ||
|
||
#self.maxDiff = None |
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.
Signed-off-by: Gang Lv [email protected]
@@ -877,6 +879,7 @@ def test_minigraph_voq_inband_port(self): | |||
self.assertDictEqual( | |||
output_dict['Ethernet-IB0'], | |||
{'lanes': '133', | |||
|
|||
'alias': 'Recycle0', |
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.
Could you remove the unnecessary new line? #Closed
output = json.loads(self.run_script(argument)) | ||
self.assertDictEqual(output, | ||
{"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1:config_db", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, | ||
"Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2:config_db", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, | ||
"Ethernet8": { "admin_status": "up", "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3:config_db", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, |
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.
Why admin_status disappear? Is it expected? #Closed
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.
The actual output does not have admin_status
as it was before PR sonic-net#10362. Signed-off-by: Suvarna Meenakshi <[email protected]>
Why I did it Need to run yang validation for sonic-cfggen unit test, and many unit test does not provide lanes for port table. How I did it Update port config file. How to verify it Run sonic-cfggen unit test, Use below PR to verify #10228 Signed-off-by: Gang Lv [email protected]
Signed-off-by: Gang Lv [email protected]
Why I did it
Need to run yang validation for sonic-cfggen unit test, and many unit test does not provide lanes for port table.
How I did it
Update port config file.
How to verify it
Run sonic-cfggen unit test,
Use below PR to verify
#10228
Which release branch to backport (provide reason below if selected)
Description for the changelog
Fix #9553
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)