12: Scripts
EMG™ Edge Management Gateway User Guide
276
print("portsession on DP ", devicePort, "unexpectedly
terminated.")
break
elif i == 2: # login prompt
p.sendline("sysadmin")
p.expect("Password:")
p.sendline("PASS")
emgDevice = True
gotPrompt = True
elif i == 3: # error from portsession
print(p.match.group(1).decode('utf-8'))
p.terminate(True)
p.wait()
break
elif i == 4: # prompt
gotPrompt = True
# end if while not gotPrompt:
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:
Summary of Contents for EMG Series
Page 100: ...7 Networking EMG Edge Management Gateway User Guide 100 Figure 7 5 Network Wireless Settings...
Page 353: ...15 Maintenance EMG Edge Management Gateway User Guide 353 Figure 15 12 About EMG...
Page 474: ...EMG Edge Management Gateway User Guide 474 Figure E 3 EU Declaration of Conformity...
Page 475: ...EMG Edge Management Gateway User Guide 475 Figure E 4 EU Declaration of Conformity continued...