
8: Device Ports
SLB™ Branch Office Manager User Guide
162
if not gotPrompt:
devicePort = devi 1
pList.append('')
continue
# Detect the prompt
devPrompt = ""
p.send("\n")
i = p.expect([pexpect.TIMEOUT, pexpect.EOF, '\r\n(.*)>'],
timeout=10)
if i == 0 or i == 1: # Timeout or EOF
print("Timeout waiting for the prompt on DP", devicePort, ".")
p.terminate(True)
p.wait()
devicePort = devi 1
pList.append('')
continue
if i == 2: # prompt
devPrompt = p.match.group(1).decode('utf-8')
if devPrompt == "":
print("Timeout waiting for the prompt on DP", devicePort, ".")
devicePort = devi 1
pList.append('')
continue
print("Detected prompt", devPrompt, ".")
# Strip characters not allowed in DP names
devPromptStrip = re.sub("[^0-9A-Za-z\._\-]", "", devPrompt)
devPromptComplete = devPromp "-" + str(devicePort)
pList.append(devPromptComplete)
p.terminate(True)
p.wait()
devicePort = devi 1
# end of while devicePort <= numPorts:
# Connect to the SLC CLI and set the device port names
p=pexpect.spawn('clisession -U sysadmin')
loggedIn = False
while not loggedIn:
i = p.expect([pexpect.TIMEOUT, pexpect.EOF,
'Model Number: SLC80(\d*)\r\n', 'Model Number:
SLB882\r\n',
'(\[.*>)'], timeout=10)
if i == 0: # Timeout
print("Timeout waiting to login.")
p.terminate(True)
sys.exit(1)
elif i == 1: # EOF
print("Session unexpectedly terminated.")
p.terminate(True)
sys.exit(1)
Содержание 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 ...