- Add more error text to exceptions.
- Do not report 'Server being reset' in HPiLO, since this is the desired case and helps return more quickly.
self.username, self.password)
cmd_out, cmd_err = locfg.run_noexcept(cmd)
self.username, self.password)
cmd_out, cmd_err = locfg.run_noexcept(cmd)
- cmd = "grep 'MESSAGE' | grep -v 'No error'"
+ cmd = "grep 'MESSAGE' | grep -v 'No error' | grep -v 'Server being reset.'"
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, close_fds=True)
(grep_in, grep_out ) = (p.stdin, p.stdout)
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, close_fds=True)
(grep_in, grep_out ) = (p.stdin, p.stdout)
443 : HTTPS,
80 : HTTP,
9100 : IPAL,
443 : HTTPS,
80 : HTTP,
9100 : IPAL,
output = self.transport.read_until(expected, self.TELNET_TIMEOUT)
if output.find(expected) == -1:
print "OUTPUT: --%s--" % output
output = self.transport.read_until(expected, self.TELNET_TIMEOUT)
if output.find(expected) == -1:
print "OUTPUT: --%s--" % output
- raise ErrorClass, "'%s' not found" % expected
+ raise ErrorClass, "'%s' not found: Got: %s" % (expected, output)
else:
self.transport.write(buffer + "\r\n")
else:
else:
self.transport.write(buffer + "\r\n")
else: