module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Dec 17, 2020
License: Apache-2.0
Opens a new window with license information.
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
Click to show internal directories.
Click to hide internal directories.