@@ -27,6 +27,7 @@ class TestMuxTunnelBase(object):
27
27
28
28
SERV1_IPV4 = "192.168.0.100"
29
29
SERV1_IPV6 = "fc02:1000::100"
30
+ SERV1_SOC_IPV4 = "192.168.0.102"
30
31
SERV2_IPV4 = "192.168.0.101"
31
32
SERV2_IPV6 = "fc02:1000::101"
32
33
IPV4_MASK = "/32"
@@ -74,7 +75,12 @@ def create_vlan_interface(self, confdb, asicdb, dvs):
74
75
75
76
def create_mux_cable (self , confdb ):
76
77
77
- fvs = { "server_ipv4" :self .SERV1_IPV4 + self .IPV4_MASK , "server_ipv6" :self .SERV1_IPV6 + self .IPV6_MASK }
78
+ fvs = {
79
+ "server_ipv4" :self .SERV1_IPV4 + self .IPV4_MASK ,
80
+ "server_ipv6" :self .SERV1_IPV6 + self .IPV6_MASK ,
81
+ "soc_ipv4" : self .SERV1_SOC_IPV4 + self .IPV4_MASK ,
82
+ "cable_type" : "active-active"
83
+ }
78
84
confdb .create_entry (self .CONFIG_MUX_CABLE , "Ethernet0" , fvs )
79
85
80
86
fvs = { "server_ipv4" :self .SERV2_IPV4 + self .IPV4_MASK , "server_ipv6" :self .SERV2_IPV6 + self .IPV6_MASK }
@@ -201,6 +207,9 @@ def create_and_test_neighbor(self, confdb, appdb, asicdb, dvs, dvs_route):
201
207
self .add_neighbor (dvs , self .SERV1_IPV6 , "00:00:00:00:00:01" , True )
202
208
srv1_v6 = self .check_neigh_in_asic_db (asicdb , self .SERV1_IPV6 , 3 )
203
209
210
+ self .add_neighbor (dvs , self .SERV1_SOC_IPV4 , "00:00:00:00:00:01" )
211
+ srv1_soc_v4 = self .check_neigh_in_asic_db (asicdb , self .SERV1_SOC_IPV4 , 4 )
212
+
204
213
existing_keys = asicdb .get_keys (self .ASIC_NEIGH_TABLE )
205
214
206
215
self .add_neighbor (dvs , self .SERV2_IPV4 , "00:00:00:00:00:02" )
@@ -212,21 +221,23 @@ def create_and_test_neighbor(self, confdb, appdb, asicdb, dvs, dvs_route):
212
221
dvs_route .check_asicdb_route_entries ([self .SERV2_IPV4 + self .IPV4_MASK , self .SERV2_IPV6 + self .IPV6_MASK ])
213
222
214
223
# The first standby route also creates as tunnel Nexthop
215
- self .check_tnl_nexthop_in_asic_db (asicdb , 3 )
224
+ self .check_tnl_nexthop_in_asic_db (asicdb , 4 )
216
225
217
226
# Change state to Standby. This will delete Neigh and add Route
218
227
self .set_mux_state (appdb , "Ethernet0" , "standby" )
219
228
220
229
asicdb .wait_for_deleted_entry (self .ASIC_NEIGH_TABLE , srv1_v4 )
221
230
asicdb .wait_for_deleted_entry (self .ASIC_NEIGH_TABLE , srv1_v6 )
222
231
dvs_route .check_asicdb_route_entries ([self .SERV1_IPV4 + self .IPV4_MASK , self .SERV1_IPV6 + self .IPV6_MASK ])
232
+ self .check_neigh_in_asic_db (asicdb , self .SERV1_SOC_IPV4 , 2 )
233
+ dvs_route .check_asicdb_deleted_route_entries ([self .SERV1_SOC_IPV4 + self .IPV4_MASK ])
223
234
224
235
# Change state to Active. This will add Neigh and delete Route
225
236
self .set_mux_state (appdb , "Ethernet4" , "active" )
226
237
227
238
dvs_route .check_asicdb_deleted_route_entries ([self .SERV2_IPV4 + self .IPV4_MASK , self .SERV2_IPV6 + self .IPV6_MASK ])
228
- self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV4 , 3 )
229
- self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV6 , 3 )
239
+ self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV4 , 4 )
240
+ self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV6 , 4 )
230
241
231
242
232
243
def create_and_test_fdb (self , appdb , asicdb , dvs , dvs_route ):
@@ -244,7 +255,7 @@ def create_and_test_fdb(self, appdb, asicdb, dvs, dvs_route):
244
255
self .add_neighbor (dvs , ip_2 , "00:00:00:00:00:12" , True )
245
256
246
257
# ip_1 is on Active Mux, hence added to Host table
247
- self .check_neigh_in_asic_db (asicdb , ip_1 , 4 )
258
+ self .check_neigh_in_asic_db (asicdb , ip_1 , 5 )
248
259
249
260
# ip_2 is on Standby Mux, hence added to Route table
250
261
dvs_route .check_asicdb_route_entries ([ip_2 + self .IPV6_MASK ])
@@ -260,7 +271,7 @@ def create_and_test_fdb(self, appdb, asicdb, dvs, dvs_route):
260
271
261
272
# ip_2 moved to active Mux, hence remove from Route table
262
273
dvs_route .check_asicdb_deleted_route_entries ([ip_2 + self .IPV6_MASK ])
263
- self .check_neigh_in_asic_db (asicdb , ip_2 , 4 )
274
+ self .check_neigh_in_asic_db (asicdb , ip_2 , 5 )
264
275
265
276
# Simulate FDB aging out test case
266
277
ip_3 = "192.168.0.200"
@@ -783,7 +794,7 @@ def test_Peer(self, dvs, testlog, setup):
783
794
784
795
self .create_and_test_peer (db , asicdb , "peer" , "1.1.1.1" , "10.1.0.32" , encap_tc_to_dscp_map_id , encap_tc_to_queue_map_id )
785
796
786
- def test_Neighbor (self , dvs , dvs_route , testlog ):
797
+ def test_Neighbor_aaa (self , dvs , dvs_route , testlog ):
787
798
""" test Neighbor entries and mux state change """
788
799
789
800
confdb = dvs .get_config_db ()
0 commit comments