@@ -349,26 +349,6 @@ def test_get_mux_server_to_port_map(self, mock_log_functions):
349349
350350 assert mux_server_to_port_map == result
351351
352- def test_get_mux_soc_neighbors (self , mock_log_functions ):
353- mux_cables = {
354- "Ethernet4" : {
355- "server_ipv4" : "192.168.0.2/32" ,
356- "server_ipv6" : "fc02:1000::2/128" ,
357- "soc_ipv4" : "192.168.0.1/32" ,
358- "state" : "active"
359- },
360- "Ethernet8" : {
361- "server_ipv4" : "192.168.0.4/32" ,
362- "soc_ipv4" : "192.168.0.3/32" ,
363- "state" : "standby"
364- }
365- }
366- expected_soc_ips = ["192.168.0.1" , "192.168.0.3" ]
367-
368- result = dualtor_neighbor_check .get_mux_soc_neighbors (mux_cables )
369-
370- assert set (expected_soc_ips ) == set (result )
371-
372352 def test_check_neighbor_consistency_soc_ip_neighbor (self , mock_log_functions ):
373353 mock_log_error , mock_log_warn , _ , _ = mock_log_functions
374354 neighbors = {"192.168.0.1" : "aa:bb:cc:dd:ee:ff" } # SOC IP neighbor
@@ -386,7 +366,6 @@ def test_check_neighbor_consistency_soc_ip_neighbor(self, mock_log_functions):
386366 ["{\" ip\" :\" 192.168.0.1\" ,\" rif\" :\" oid:0x6000000000671\" ," +
387367 "\" switch_id\" :\" oid:0x21000000000000\" }" ]
388368 mux_server_to_port_map = {}
389- mux_soc_neigh_ips = ["192.168.0.1" , "192.168.0.3" ] # SOC neighbor IPs
390369 expected_output = \
391370 ["192.168.0.1" , "aa:bb:cc:dd:ee:ff" , "Ethernet4" , "active" , "no" , "yes" , "yes" , "NEIGHBOR" , "consistent" ]
392371 expected_log_output = tabulate .tabulate (
@@ -404,8 +383,7 @@ def test_check_neighbor_consistency_soc_ip_neighbor(self, mock_log_functions):
404383 asic_route_table ,
405384 asic_neigh_table ,
406385 {'oid:0x40000000005c0' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_IP' , 'nexthop_id' : 'oid:0x40000000005c0' }},
407- mux_server_to_port_map ,
408- mux_soc_neigh_ips
386+ mux_server_to_port_map
409387 )
410388 res = dualtor_neighbor_check .parse_check_results (check_results )
411389
@@ -450,7 +428,6 @@ def test_check_neighbor_consistency_multiple_neighbors_with_soc_ips(self, mock_l
450428 "{\" ip\" :\" 192.168.0.5\" ,\" rif\" :\" oid:0x6000000000671\" ,\" switch_id\" :\" oid:0x21000000000000\" }"
451429 ]
452430 mux_server_to_port_map = {"192.168.0.2" : "Ethernet4" }
453- mux_soc_neigh_ips = ["192.168.0.1" , "192.168.0.3" ]
454431 expected_outputs = [
455432 ["192.168.0.1" , "aa:bb:cc:dd:ee:ff" , "Ethernet4" , "active" , "no" , "yes" , "yes" , "NEIGHBOR" , "consistent" ],
456433 ["192.168.0.2" , "ee:86:d8:46:7d:01" , "Ethernet4" , "active" , "no" , "yes" , "yes" , "NEIGHBOR" , "consistent" ],
@@ -476,8 +453,7 @@ def test_check_neighbor_consistency_multiple_neighbors_with_soc_ips(self, mock_l
476453 'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP' ,
477454 'nexthop_id' : 'oid:0x40000000005ae' }
478455 },
479- mux_server_to_port_map ,
480- mux_soc_neigh_ips
456+ mux_server_to_port_map
481457 )
482458 res = dualtor_neighbor_check .parse_check_results (check_results )
483459
@@ -510,8 +486,7 @@ def test_check_neighbor_consistency_no_fdb_entry(self, mock_log_functions):
510486 asic_route_table ,
511487 asic_neigh_table ,
512488 {},
513- mux_server_to_port_map ,
514- []
489+ mux_server_to_port_map
515490 )
516491 res = dualtor_neighbor_check .parse_check_results (check_results )
517492
@@ -552,8 +527,7 @@ def test_check_neighbor_consistency_consistent_neighbor_mux_active(self, mock_lo
552527 asic_route_table ,
553528 asic_neigh_table ,
554529 {'oid:0x40000000005c0' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_IP' , 'nexthop_id' : 'oid:0x40000000005c0' }},
555- mux_server_to_port_map ,
556- []
530+ mux_server_to_port_map
557531 )
558532 res = dualtor_neighbor_check .parse_check_results (check_results )
559533
@@ -596,8 +570,7 @@ def test_check_neighbor_consistency_inconsistent_neighbor_mux_active_no_asic_nei
596570 asic_neigh_table ,
597571 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP' ,
598572 'nexthop_id' : 'oid:0x40000000005ae' }},
599- mux_server_to_port_map ,
600- []
573+ mux_server_to_port_map
601574 )
602575 res = dualtor_neighbor_check .parse_check_results (check_results )
603576
@@ -640,8 +613,7 @@ def test_check_neighbor_consistency_inconsistent_neighbor_mux_active_asic_tunnel
640613 asic_neigh_table ,
641614 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP' ,
642615 'nexthop_id' : 'oid:0x40000000005ae' }},
643- mux_server_to_port_map ,
644- []
616+ mux_server_to_port_map
645617 )
646618 res = dualtor_neighbor_check .parse_check_results (check_results )
647619
@@ -682,8 +654,7 @@ def test_check_neighbor_consistency_inconsistent_neighbor_mux_active_in_toggle(s
682654 asic_neigh_table ,
683655 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP' ,
684656 'nexthop_id' : 'oid:0x40000000005ae' }},
685- mux_server_to_port_map ,
686- []
657+ mux_server_to_port_map
687658 )
688659 res = dualtor_neighbor_check .parse_check_results (check_results )
689660
@@ -724,8 +695,7 @@ def test_check_neighbor_consistency_consistent_neighbor_mux_standby(self, mock_l
724695 asic_neigh_table ,
725696 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP' ,
726697 'nexthop_id' : 'oid:0x40000000005ae' }},
727- mux_server_to_port_map ,
728- []
698+ mux_server_to_port_map
729699 )
730700 res = dualtor_neighbor_check .parse_check_results (check_results )
731701
@@ -767,8 +737,7 @@ def test_check_nbr_consistency_inconsistent_nbr_mux_standby_no_asic_tunnel_route
767737 asic_route_table ,
768738 asic_neigh_table ,
769739 {'oid:0x40000000005c0' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_IP' , 'nexthop_id' : 'oid:0x40000000005c0' }},
770- mux_server_to_port_map ,
771- []
740+ mux_server_to_port_map
772741 )
773742 res = dualtor_neighbor_check .parse_check_results (check_results )
774743
@@ -812,8 +781,7 @@ def test_check_neighbor_consistency_inconsistent_neighbor_mux_standby_asic_neigh
812781 asic_neigh_table ,
813782 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_IP' ,
814783 'nexthop_id' : 'oid:0x40000000005ae' }},
815- mux_server_to_port_map ,
816- []
784+ mux_server_to_port_map
817785 )
818786 res = dualtor_neighbor_check .parse_check_results (check_results )
819787
@@ -854,8 +822,7 @@ def test_check_neighbor_consistency_inconsistent_neighbor_mux_standby_in_toggle(
854822 asic_neigh_table ,
855823 {'oid:0x40000000005ae' : {'nexthop_type' : 'SAI_NEXT_HOP_TYPE_IP' ,
856824 'nexthop_id' : 'oid:0x40000000005ae' }},
857- mux_server_to_port_map ,
858- []
825+ mux_server_to_port_map
859826 )
860827 res = dualtor_neighbor_check .parse_check_results (check_results )
861828
@@ -895,8 +862,7 @@ def test_check_neighbor_consistency_zero_mac_neighbor(self, mock_log_functions):
895862 asic_route_table ,
896863 asic_neigh_table ,
897864 {},
898- mux_server_to_port_map ,
899- []
865+ mux_server_to_port_map
900866 )
901867 res = dualtor_neighbor_check .parse_check_results (check_results )
902868
@@ -931,8 +897,7 @@ def test_check_neighbor_consistency_zero_mac_expired_neighbor(self, mock_log_fun
931897 asic_route_table ,
932898 asic_neigh_table ,
933899 {},
934- mux_server_to_port_map ,
935- []
900+ mux_server_to_port_map
936901 )
937902 res = dualtor_neighbor_check .parse_check_results (check_results )
938903
@@ -968,8 +933,7 @@ def test_check_neighbor_consistency_inconsistent_zero_mac_neighbor(self, mock_lo
968933 asic_route_table ,
969934 asic_neigh_table ,
970935 {},
971- mux_server_to_port_map ,
972- []
936+ mux_server_to_port_map
973937 )
974938 res = dualtor_neighbor_check .parse_check_results (check_results )
975939
0 commit comments