Skip to content

Commit 58db48a

Browse files
zjswhhhyxieca
authored andcommitted
[show][muxcable] update show mux tunnel-route to check soc_ipv6 as well
1 parent 24fc1db commit 58db48a

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

show/muxcable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def get_tunnel_route_per_port(db, port_tunnel_route, per_npu_configdb, per_npu_a
592592

593593
mux_cfg_dict = per_npu_configdb[asic_id].get_all(
594594
per_npu_configdb[asic_id].CONFIG_DB, 'MUX_CABLE|{}'.format(port))
595-
dest_names = ["server_ipv4", "server_ipv6", "soc_ipv4"]
595+
dest_names = ["server_ipv4", "server_ipv6", "soc_ipv4", "soc_ipv6"]
596596

597597
for name in dest_names:
598598
dest_address = mux_cfg_dict.get(name, None)

tests/mock_tables/asic_db.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@
2323
"ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY:{\"dest\":\"10.2.1.1\",\"switch_id\":\"oid:0x21000000000000\",\"vr\":\"oid:0x300000000007c\"}": {
2424
"SAI_ROUTE_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
2525
"SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID": "oid:0x40000000015d8"
26-
}
26+
},
27+
"ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY:{\"dest\":\"e801::47\",\"switch_id\":\"oid:0x21000000000000\",\"vr\":\"oid:0x300000000007c\"}": {
28+
"SAI_ROUTE_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
29+
"SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID": "oid:0x40000000015d8"
30+
}
2731
}

tests/mock_tables/config_db.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,8 @@
18081808
"MUX_CABLE|Ethernet4": {
18091809
"state": "auto",
18101810
"server_ipv4": "10.3.1.1",
1811-
"server_ipv6": "e801::46"
1811+
"server_ipv6": "e801::46",
1812+
"soc_ipv6": "e801::47"
18121813
},
18131814
"MUX_CABLE|Ethernet8": {
18141815
"state": "active",

tests/muxcable_test.py

+6
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,11 @@
580580
"DEST": "10.3.1.1",
581581
"kernel": 1,
582582
"asic": false
583+
},
584+
"soc_ipv6": {
585+
"DEST": "e801::47",
586+
"kernel": false,
587+
"asic": 1
583588
}
584589
}
585590
}
@@ -591,6 +596,7 @@
591596
--------- ----------- -------------- -------- ------
592597
Ethernet0 server_ipv4 10.2.1.1 added added
593598
Ethernet4 server_ipv4 10.3.1.1 added -
599+
Ethernet4 soc_ipv6 e801::47 - added
594600
"""
595601

596602
show_muxcable_tunnel_route_expected_output_port_json="""\

0 commit comments

Comments
 (0)