
8: Device Ports
SLB™ Branch Office Manager User Guide
148
Note:
For CLI sessions, a local user name should be given
For Device Port sessions, the $devicePort variable will be used by the SLB to connect
the script to the appropriate Device Port. The
-noecho
flag may be passed to
spawn
command.
Expect script - CLI session
spawn clisession -U <username>
Expect script - Device Port session
spawn portsession -p $devicePort
Tcl script - CLI session
set io [open "| clisession -U <username>" r+]
Tcl script - Device Port session
set io [open "| portsession -p $devicePort" r+]
Python script - CLI session
subprocess.Popen(['clisession', '-U', '<username>'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
Python script - Device Port session
subprocess.Popen(['portsession', '-p', devicePort],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
It is recommended that scripts that spawn clisession only be used with the
set script runcli
command (and not the
connect script
command), and that scripts that spawn portsession
only be used with the
connect script
command (and not the
set script runcli
command).
5. The script cannot contain commands which spawn or fork other commands, read or write files
on the SLB filesystem, or interrogate the SLB environment. The list of commands that are not
allowed for Expect scripts includes
"fork", "open", "exp_open", "exec",
"system", "log_file", "pwd"
.
6. For scripts that return an exit code, the SLB will interpret an exit code of zero as a successful
exit code, and any non-zero exit code as an error. Non-zero exit codes are displayed (at the
CLI) or logged (for scripts that are run by the script scheduler).
Содержание 100-120 VAC SLB
Страница 114: ...8 Device Ports SLB Branch Office Manager User Guide 114 Figure 8 4 Device Ports Settings ...
Страница 131: ...8 Device Ports SLB Branch Office Manager User Guide 131 Figure 8 10 Devices Power Outlets ...
Страница 174: ...9 USB Port SLB Branch Office Manager User Guide 174 Figure 9 3 Devices USB Modem ...
Страница 227: ...12 Maintenance SLB Branch Office Manager User Guide 227 Figure 12 1 Maintenance Firmware Configurations ...