@@ -29,6 +29,10 @@ class TestMuxTunnelBase(object):
29
29
SERV1_IPV6 = "fc02:1000::100"
30
30
SERV2_IPV4 = "192.168.0.101"
31
31
SERV2_IPV6 = "fc02:1000::101"
32
+ SERV3_IPV4 = "192.168.0.102"
33
+ SERV3_IPV6 = "fc02:1000::102"
34
+ SERV3_SOC_IPV4 = "192.168.0.103"
35
+ SERV3_SOC_IPV6 = "fc02:1000::103"
32
36
IPV4_MASK = "/32"
33
37
IPV6_MASK = "/128"
34
38
TUNNEL_NH_ID = 0
@@ -80,6 +84,14 @@ def create_mux_cable(self, confdb):
80
84
fvs = { "server_ipv4" :self .SERV2_IPV4 + self .IPV4_MASK , "server_ipv6" :self .SERV2_IPV6 + self .IPV6_MASK }
81
85
confdb .create_entry (self .CONFIG_MUX_CABLE , "Ethernet4" , fvs )
82
86
87
+ fvs = {
88
+ "server_ipv4" : self .SERV3_IPV4 + self .IPV4_MASK ,
89
+ "server_ipv6" : self .SERV3_IPV6 + self .IPV6_MASK ,
90
+ "soc_ipv4" : self .SERV3_SOC_IPV4 + self .IPV4_MASK ,
91
+ "soc_ipv6" : self .SERV3_SOC_IPV6 + self .IPV6_MASK ,
92
+ "cable_type" : "active-active"
93
+ }
94
+ confdb .create_entry (self .CONFIG_MUX_CABLE , "Ethernet8" , fvs )
83
95
84
96
def set_mux_state (self , appdb , ifname , state_change ):
85
97
@@ -193,6 +205,7 @@ def create_and_test_neighbor(self, confdb, appdb, asicdb, dvs, dvs_route):
193
205
194
206
self .set_mux_state (appdb , "Ethernet0" , "active" )
195
207
self .set_mux_state (appdb , "Ethernet4" , "standby" )
208
+ self .set_mux_state (appdb , "Ethernet8" , "active" )
196
209
197
210
self .add_neighbor (dvs , self .SERV1_IPV4 , "00:00:00:00:00:01" )
198
211
# Broadcast neigh 192.168.0.255 is default added. Hence +1 for expected number
@@ -201,6 +214,18 @@ def create_and_test_neighbor(self, confdb, appdb, asicdb, dvs, dvs_route):
201
214
self .add_neighbor (dvs , self .SERV1_IPV6 , "00:00:00:00:00:01" , True )
202
215
srv1_v6 = self .check_neigh_in_asic_db (asicdb , self .SERV1_IPV6 , 3 )
203
216
217
+ self .add_neighbor (dvs , self .SERV3_IPV4 , "00:00:00:00:00:03" )
218
+ srv3_v4 = self .check_neigh_in_asic_db (asicdb , self .SERV3_IPV4 , 4 )
219
+
220
+ self .add_neighbor (dvs , self .SERV3_IPV6 , "00:00:00:00:00:03" , True )
221
+ srv3_v6 = self .check_neigh_in_asic_db (asicdb , self .SERV3_IPV6 , 5 )
222
+
223
+ self .add_neighbor (dvs , self .SERV3_SOC_IPV4 , "00:00:00:00:00:04" )
224
+ self .check_neigh_in_asic_db (asicdb , self .SERV3_SOC_IPV4 , 6 )
225
+
226
+ self .add_neighbor (dvs , self .SERV3_SOC_IPV6 , "00:00:00:00:00:04" , True )
227
+ self .check_neigh_in_asic_db (asicdb , self .SERV3_SOC_IPV6 , 7 )
228
+
204
229
existing_keys = asicdb .get_keys (self .ASIC_NEIGH_TABLE )
205
230
206
231
self .add_neighbor (dvs , self .SERV2_IPV4 , "00:00:00:00:00:02" )
@@ -225,9 +250,18 @@ def create_and_test_neighbor(self, confdb, appdb, asicdb, dvs, dvs_route):
225
250
self .set_mux_state (appdb , "Ethernet4" , "active" )
226
251
227
252
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 )
253
+ self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV4 , 7 )
254
+ self .check_neigh_in_asic_db (asicdb , self .SERV2_IPV6 , 7 )
255
+
256
+ self .set_mux_state (appdb , "Ethernet8" , "standby" )
257
+
258
+ asicdb .wait_for_deleted_entry (self .ASIC_NEIGH_TABLE , srv3_v4 )
259
+ asicdb .wait_for_deleted_entry (self .ASIC_NEIGH_TABLE , srv3_v6 )
260
+ dvs_route .check_asicdb_route_entries ([self .SERV3_IPV4 + self .IPV4_MASK , self .SERV3_IPV6 + self .IPV6_MASK ])
230
261
262
+ self .check_neigh_in_asic_db (asicdb , self .SERV3_SOC_IPV4 , 5 )
263
+ self .check_neigh_in_asic_db (asicdb , self .SERV3_SOC_IPV4 , 5 )
264
+ dvs_route .check_asicdb_deleted_route_entries ([self .SERV3_SOC_IPV4 + self .IPV4_MASK , self .SERV3_SOC_IPV4 + self .IPV6_MASK ])
231
265
232
266
def create_and_test_fdb (self , appdb , asicdb , dvs , dvs_route ):
233
267
0 commit comments