Skip to content

Commit

Permalink
parent type change to use lookup (openconfig#2808)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvbaska1 authored Apr 12, 2024
1 parent 2ef8bf6 commit e6f8961
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,9 @@ func ValidateComponentState(t *testing.T, dut *ondatra.DUTDevice, cards []*oc.Co
t.Errorf("Component %s Parent: Chassis component NOT found in the hierarchy tree of component", cName)
break
}
parentType := gnmi.Get(t, dut, gnmi.OC().Component(parent).Type().State())
if parentType == componentType["Chassis"] {
pLoookup := gnmi.Lookup(t, dut, gnmi.OC().Component(parent).Type().State())
parentType, present := pLoookup.Val()
if present && parentType == componentType["Chassis"] {
t.Logf("Component %s Parent: Found chassis component in the hierarchy tree of component", cName)
break
}
Expand Down

0 comments on commit e6f8961

Please sign in to comment.