12345678910111213141516171819202122232425262728293031323334353637 |
- package main
- import (
- "fmt"
- "github.com/lucklucif/ipmigo"
- )
- func main() {
- c, err := ipmigo.NewClient(ipmigo.Arguments{
- Version: ipmigo.V2_0,
- Address: "120.46.150.226:623",
- Username: "ADMIN",
- Password: "ADMIN",
- CipherSuiteID: 3,
- })
- if err != nil {
- fmt.Println(err)
- return
- }
- if err := c.Open(); err != nil {
- fmt.Println(err)
- return
- }
- defer c.Close()
- //err = c.Ping()
- //if err != nil {
- // fmt.Println(err)
- // return
- //}
- //cmd := ipmigo.GetChassisStatusCommand{}
- //if err := c.Execute(&cmd); err != nil {
- // fmt.Println(err)
- // return
- //}
- //fmt.Println("Power On Hours", cmd)
- }
|