@@ -99,6 +99,10 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
9999 globalISIS .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV6 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Enabled = ygot .Bool (true )
100100 globalISIS .LevelCapability = oc .Isis_LevelType_LEVEL_2
101101 globalISIS .AuthenticationCheck = ygot .Bool (true )
102+ if deviations .ISISGlobalAuthenticationNotRequired (ts .DUT ) {
103+ globalISIS .AuthenticationCheck = nil
104+ }
105+ globalISIS .HelloPadding = oc .Isis_HelloPaddingType_ADAPTIVE
102106
103107 // Level configs.
104108 level := isis .GetOrCreateLevel (2 )
@@ -111,6 +115,11 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
111115 auth .AuthMode = oc .IsisTypes_AUTH_MODE_MD5
112116 auth .AuthType = oc .KeychainTypes_AUTH_TYPE_SIMPLE_KEY
113117 auth .AuthPassword = ygot .String (password )
118+ if deviations .ISISExplicitLevelAuthenticationConfig (ts .DUT ) {
119+ auth .DisableCsnp = ygot .Bool (false )
120+ auth .DisableLsp = ygot .Bool (false )
121+ auth .DisablePsnp = ygot .Bool (false )
122+ }
114123
115124 // Interface configs.
116125 intfName := ts .DUTPort1 .Name ()
@@ -145,6 +154,10 @@ func configureISIS(t *testing.T, ts *isissession.TestSession) {
145154 isisIntfLevel .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV4 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Metric = ygot .Uint32 (dutV4Metric )
146155 isisIntfLevel .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV6 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Enabled = ygot .Bool (true )
147156 isisIntfLevel .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV6 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Metric = ygot .Uint32 (dutV6Metric )
157+ if deviations .MissingIsisInterfaceAfiSafiEnable (ts .DUT ) {
158+ isisIntfLevel .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV4 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Enabled = nil
159+ isisIntfLevel .GetOrCreateAf (oc .IsisTypes_AFI_TYPE_IPV6 , oc .IsisTypes_SAFI_TYPE_UNICAST ).Enabled = nil
160+ }
148161}
149162
150163// configureOTG configures isis and traffic on OTG.
@@ -213,13 +226,15 @@ func TestISISWideMetricNotEnabled(t *testing.T) {
213226 fptest .LogQuery (t , "Protocol ISIS" , isissession .ProtocolPath (ts .DUT ).Config (), pcl )
214227
215228 ts .PushAndStart (t )
229+ time .Sleep (time .Minute * 2 )
216230
217231 statePath := isissession .ISISPath (ts .DUT )
218232 intfName := ts .DUTPort1 .Name ()
219233 if deviations .ExplicitInterfaceInDefaultVRF (ts .DUT ) || deviations .InterfaceRefInterfaceIDFormat (ts .DUT ) {
220234 intfName += ".0"
221235 }
222236 t .Run ("Isis telemetry" , func (t * testing.T ) {
237+
223238 // Checking adjacency
224239 ateSysID , err := ts .AwaitAdjacency ()
225240 if err != nil {
@@ -265,8 +280,10 @@ func TestISISWideMetricNotEnabled(t *testing.T) {
265280 if got := gnmi .Get (t , ts .DUT , adjPath .LocalExtendedCircuitId ().State ()); got == 0 {
266281 t .Errorf ("FAIL- Expected local extended circuit id not found,expected non-zero value, got %d" , got )
267282 }
268- if got := gnmi .Get (t , ts .DUT , adjPath .MultiTopology ().State ()); got != false {
269- t .Errorf ("FAIL- Expected value for multi topology not found, got %t, want %t" , got , false )
283+ if ! deviations .ISISMultiTopologyUnsupported (ts .DUT ) {
284+ if got := gnmi .Get (t , ts .DUT , adjPath .MultiTopology ().State ()); got != false {
285+ t .Errorf ("FAIL- Expected value for multi topology not found, got %t, want %t" , got , false )
286+ }
270287 }
271288 if got := gnmi .Get (t , ts .DUT , adjPath .NeighborCircuitType ().State ()); got != oc .Isis_LevelType_LEVEL_2 {
272289 t .Errorf ("FAIL- Expected value for circuit type not found, got %s, want %s" , got , oc .Isis_LevelType_LEVEL_2 )
@@ -304,43 +321,66 @@ func TestISISWideMetricNotEnabled(t *testing.T) {
304321 }
305322 })
306323 t .Run ("System level counter checks" , func (t * testing.T ) {
307- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().AuthFails ().State ()); got != 0 {
308- t .Errorf ("FAIL- Not expecting any authentication key failure, got %d, want %d" , got , 0 )
324+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
325+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().AuthFails ().State ()); got != 0 {
326+ t .Errorf ("FAIL- Not expecting any authentication key failure, got %d, want %d" , got , 0 )
327+ }
309328 }
310- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().AuthTypeFails ().State ()); got != 0 {
311- t .Errorf ("FAIL- Not expecting any authentication type mismatches, got %d, want %d" , got , 0 )
329+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
330+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().AuthTypeFails ().State ()); got != 0 {
331+ t .Errorf ("FAIL- Not expecting any authentication type mismatches, got %d, want %d" , got , 0 )
332+ }
312333 }
313- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().CorruptedLsps ().State ()); got != 0 {
314- t .Errorf ("FAIL- Not expecting any corrupted lsps, got %d, want %d" , got , 0 )
334+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
335+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().CorruptedLsps ().State ()); got != 0 {
336+ t .Errorf ("FAIL- Not expecting any corrupted lsps, got %d, want %d" , got , 0 )
337+ }
315338 }
316- if ! deviations .IsisDatabaseOverloadsUnsupported (ts .DUT ) {
339+
340+ if ! deviations .IsisDatabaseOverloadsUnsupported (ts .DUT ) && ! deviations .MissingValueForDefaults (ts .DUT ) {
317341 if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().DatabaseOverloads ().State ()); got != 0 {
318342 t .Errorf ("FAIL- Not expecting pre isis config database_overloads value to change, got %d, want %d" , got , 0 )
319343 }
320344 }
321- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().ExceedMaxSeqNums ().State ()); got != 0 {
322- t .Errorf ("FAIL- Not expecting non zero max_seqnum counter, got %d, want %d" , got , 0 )
345+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
346+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().ExceedMaxSeqNums ().State ()); got != 0 {
347+ t .Errorf ("FAIL- Not expecting non zero max_seqnum counter, got %d, want %d" , got , 0 )
348+ }
323349 }
324- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().IdLenMismatch ().State ()); got != 0 {
325- t .Errorf ("FAIL- Not expecting non zero IdLen_Mismatch counter, got %d, want %d" , got , 0 )
350+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
351+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().IdLenMismatch ().State ()); got != 0 {
352+ t .Errorf ("FAIL- Not expecting non zero IdLen_Mismatch counter, got %d, want %d" , got , 0 )
353+ }
326354 }
327- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().LspErrors ().State ()); got != 0 {
328- t .Errorf ("FAIL- Not expecting any lsp errors, got %d, want %d" , got , 0 )
355+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
356+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().LspErrors ().State ()); got != 0 {
357+ t .Errorf ("FAIL- Not expecting any lsp errors, got %d, want %d" , got , 0 )
358+ }
329359 }
330- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().MaxAreaAddressMismatches ().State ()); got != 0 {
331- t .Errorf ("FAIL- Not expecting non zero MaxAreaAddressMismatches counter, got %d, want %d" , got , 0 )
360+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
361+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().MaxAreaAddressMismatches ().State ()); got != 0 {
362+ t .Errorf ("FAIL- Not expecting non zero MaxAreaAddressMismatches counter, got %d, want %d" , got , 0 )
363+ }
332364 }
333- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().OwnLspPurges ().State ()); got != 0 {
334- t .Errorf ("FAIL- Not expecting non zero OwnLspPurges counter, got %d, want %d" , got , 0 )
365+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
366+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().OwnLspPurges ().State ()); got != 0 {
367+ t .Errorf ("FAIL- Not expecting non zero OwnLspPurges counter, got %d, want %d" , got , 0 )
368+ }
335369 }
336- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().SeqNumSkips ().State ()); got != 0 {
337- t .Errorf ("FAIL- Not expecting non zero SeqNumber skips, got %d, want %d" , got , 0 )
370+ if ! deviations .MissingValueForDefaults (ts .DUT ) {
371+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().SeqNumSkips ().State ()); got != 0 {
372+ t .Errorf ("FAIL- Not expecting non zero SeqNumber skips, got %d, want %d" , got , 0 )
373+ }
338374 }
339- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().ManualAddressDropFromAreas ().State ()); got != 0 {
340- t .Errorf ("FAIL- Not expecting non zero ManualAddressDropFromAreas counter, got %d, want %d" , got , 0 )
375+ if ! deviations .MissingValueForDefaults (ts .DUT ) && ! deviations .ISISCounterManualAddressDropFromAreasUnsupported (ts .DUT ) {
376+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().ManualAddressDropFromAreas ().State ()); got != 0 {
377+ t .Errorf ("FAIL- Not expecting non zero ManualAddressDropFromAreas counter, got %d, want %d" , got , 0 )
378+ }
341379 }
342- if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().PartChanges ().State ()); got != 0 {
343- t .Errorf ("FAIL- Not expecting partition changes, got %d, want %d" , got , 0 )
380+ if ! deviations .MissingValueForDefaults (ts .DUT ) && ! deviations .ISISCounterPartChangesUnsupported (ts .DUT ) {
381+ if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().PartChanges ().State ()); got != 0 {
382+ t .Errorf ("FAIL- Not expecting partition changes, got %d, want %d" , got , 0 )
383+ }
344384 }
345385 if got := gnmi .Get (t , ts .DUT , statePath .Level (2 ).SystemLevelCounters ().SpfRuns ().State ()); got == 0 {
346386 t .Errorf ("FAIL- Not expecting spf runs counter to be 0, got %d, want non zero" , got )
0 commit comments