main.go 637 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/lucklucif/ipmigo"
  5. )
  6. func main() {
  7. c, err := ipmigo.NewClient(ipmigo.Arguments{
  8. Version: ipmigo.V2_0,
  9. Address: "120.46.150.226:623",
  10. Username: "ADMIN",
  11. Password: "ADMIN",
  12. CipherSuiteID: 3,
  13. })
  14. if err != nil {
  15. fmt.Println(err)
  16. return
  17. }
  18. if err := c.Open(); err != nil {
  19. fmt.Println(err)
  20. return
  21. }
  22. defer c.Close()
  23. //err = c.Ping()
  24. //if err != nil {
  25. // fmt.Println(err)
  26. // return
  27. //}
  28. //cmd := ipmigo.GetChassisStatusCommand{}
  29. //if err := c.Execute(&cmd); err != nil {
  30. // fmt.Println(err)
  31. // return
  32. //}
  33. //fmt.Println("Power On Hours", cmd)
  34. }