Skip to content

Commit

Permalink
change to use state for power-admin-state leaf
Browse files Browse the repository at this point in the history
  • Loading branch information
arvbaska1 authored and self-maurya committed Dec 13, 2024
1 parent 39634bc commit b753ed6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1055,23 +1055,23 @@ func TestDefaultPowerAdminState(t *testing.T) {
t.Logf("Supervisors: %v", supervisors)

if len(fabrics) != 0 {
pas := gnmi.Get(t, dut, gnmi.OC().Component(fabrics[0].GetName()).Fabric().PowerAdminState().Config())
pas := gnmi.Get(t, dut, gnmi.OC().Component(fabrics[0].GetName()).Fabric().PowerAdminState().State())
t.Logf("Component %s PowerAdminState: %v", fabrics[0].GetName(), pas)
if pas == oc.Platform_ComponentPowerType_UNSET {
t.Errorf("Component %s PowerAdminState is unset", fabrics[0].GetName())
}
}

if len(linecards) != 0 {
pas := gnmi.Get(t, dut, gnmi.OC().Component(linecards[0].GetName()).Linecard().PowerAdminState().Config())
pas := gnmi.Get(t, dut, gnmi.OC().Component(linecards[0].GetName()).Linecard().PowerAdminState().State())
t.Logf("Component %s PowerAdminState: %v", linecards[0].GetName(), pas)
if pas == oc.Platform_ComponentPowerType_UNSET {
t.Errorf("Component %s PowerAdminState is unset", linecards[0].GetName())
}
}
if !deviations.SkipControllerCardPowerAdmin(dut) {
if len(supervisors) != 0 {
pas := gnmi.Get(t, dut, gnmi.OC().Component(supervisors[0].GetName()).ControllerCard().PowerAdminState().Config())
pas := gnmi.Get(t, dut, gnmi.OC().Component(supervisors[0].GetName()).ControllerCard().PowerAdminState().State())
t.Logf("Component %s PowerAdminState: %v", supervisors[0].GetName(), pas)
if pas == oc.Platform_ComponentPowerType_UNSET {
t.Errorf("Component %s PowerAdminState is unset", supervisors[0].GetName())
Expand Down

0 comments on commit b753ed6

Please sign in to comment.