Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FP-1.1: Power admin DOWN/UP Test #3144

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ func TestFabricPowerAdmin(t *testing.T) {
dut := ondatra.DUT(t, "dut")
fs := components.FindComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FABRIC)

removable_fabrics := make([]string, 0)
for _, f := range fs {
compMtyVal, compMtyPresent := gnmi.Lookup(t, dut, gnmi.OC().Component(f).Empty().State()).Val()
cakhil45 marked this conversation as resolved.
Show resolved Hide resolved
if compMtyPresent && compMtyVal {
continue
}
if gnmi.Get(t, dut, gnmi.OC().Component(f).Removable().State()) {
cakhil45 marked this conversation as resolved.
Show resolved Hide resolved
removable_fabrics = append(removable_fabrics, f)
}
}
t.Logf("removable_fabrics are %v", removable_fabrics)
fs = removable_fabrics
if len(fs) == 0 {
t.Skipf("Get Fabric card list for %q: got 0, want > 0", dut.Model())
}

for _, f := range fs {
t.Run(f, func(t *testing.T) {

Expand Down
Loading