[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.
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.
If port speed is not mandatory, no need to fix?
There was a problem hiding this comment.
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
| argument = '-m "' + self.sample_graph_simple_case + '" -p "' + self.port_config + '" -v "PORT"' | ||
| output = self.run_script(argument) | ||
|
|
||
| #self.maxDiff = None |
Signed-off-by: Gang Lv [email protected]
| output_dict['Ethernet-IB0'], | ||
| {'lanes': '133', | ||
|
|
||
| 'alias': 'Recycle0', |
There was a problem hiding this comment.
Could you remove the unnecessary new line? #Closed
| 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.
Why admin_status disappear? Is it expected? #Closed
There was a problem hiding this comment.
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)