
8: Device Ports
SLB™ Branch Office Manager User Guide
163
elif i == 4: # prompt
loggedIn = True
devicePort = 1
while devicePort <= numPorts:
if skipPorts and devicePort >= 9 and devicePort <= 16:
devicePort = devi 1
continue
if len(pList[devicePort - 1]) > 0:
# Detected a prompt; set it
print("Setting name on DP", devicePort, "to", pList[devicePort -
1], "...")
s = "set deviceport port " + str(devicePort) + " name " +
pList[devicePort - 1]
p.sendline(s)
i = p.expect([pexpect.TIMEOUT,
'Device Port settings successfully updated.\r\n'],
timeout=10)
if i == 0: # Timeout
print("Timeout waiting for response.")
devicePort = devi 1
# Terminate the CLI session
p.sendline("logout")
time.sleep(.500)
p.wait()
print("Script completed.")
sys.exit(0)
Tcl Custom Script - SLB CLI Session
An example of a Tcl Custom Script that interacts with a CLI session:
#! tcl
# Script to get the current internal temperature of the SLB
# Accepts one optional command line parameter for location
set slcTemp "unknown"
set location ""
# Are there any command line parameters?
if {$argc > 0} {
set location [lindex $argv 0]
}
set now [clock seconds]
set date [clock format $now -format {%D %R}]
if {$argc > 0} {
puts "Internal temperature of the $location SLC at $date"
} else {
puts "Internal temperature of the SLC at $date"
}
Содержание 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 ...