axepect

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: Apache-2.0

README

Most of the function here can be gleaned from cimc/cmd/main.go.

Things you can do.

  • connect:

    sess, err := cimc.Session("admin", "SUPER-SECRET", "10.0.1.1")
    
  • send a command, get the reply.

    resp, err := sess.SendCmd("show cimc")
    
  • handle scope commands transparently. If the first char of the command is a '/' then the command will be run in the provided scope.

    resp, err := sess.SendCmd("/chassis/power on")
    

    will send:

      * `top`
      * `scope /chassis`
      * power on
    
  • connect to the console, use goexpect on your own, then go back to cimc shell.

    e, err := sess.ExpectHostConsole()
    
    e.Send("username\n")
    sess.EndHostConsole()
    
    

Build

Type make

Directories

Path Synopsis
cmd
cimc command
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL