Skip to content

Commit

Permalink
Add more testing prints
Browse files Browse the repository at this point in the history
  • Loading branch information
bensallen committed May 23, 2016
1 parent 27b83fa commit 53af0ba
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@ import (
"gitlab.alcf.anl.gov/jlse/sastopo/lib"
)

func findDevMissingPaths(count int, devices map[string]*sastopo.Device) {
for _, d := range devices {
if len(d.MultiPath.Paths) != count {
fmt.Printf("Path Count Mismatch: %#v, found %d paths\n", d.Serial, len(d.MultiPath.Paths))
}
}
}

func main() {
devices, err := sastopo.ScsiDevices()
devices, _, HBAs, err := sastopo.ScsiDevices()
if err != nil {
fmt.Print(err)
}
for _, device := range devices {
fmt.Printf("Found Device: %#v \n", device.Serial)
fmt.Printf("Found Device: %#v \n", device.HBA)
}
fmt.Printf("Found HBAs: %#v \n", HBAs)

findDevMissingPaths(2, devices)

}

0 comments on commit 53af0ba

Please sign in to comment.