Skip to content

Commit

Permalink
fix --all flag for power operations
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Capdevila <[email protected]>
  • Loading branch information
pau-hedgehog committed Jan 2, 2025
1 parent 7d00253 commit 9cbd18f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/hhfab/vlabhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ func (c *Config) VLABPower(ctx context.Context, name string, action string, pduC
// Populate entries
foundAnnotations := false
for _, sw := range switches.Items {
// Skip if the name is not "--all" and doesn't match sw.Name
if name != "--all" && sw.Name != name {
// Skip if the name is not AllSwitches and doesn't match sw.Name
if name != AllSwitches && sw.Name != name {
continue
}
powerInfo := hhfctl.GetPowerInfo(&sw)
Expand All @@ -425,7 +425,7 @@ func (c *Config) VLABPower(ctx context.Context, name string, action string, pduC

if !foundAnnotations {
targetSW := name
if name == "--all" {
if name == AllSwitches {
targetSW = "any switches"
}

Expand Down

0 comments on commit 9cbd18f

Please sign in to comment.