def getIPFromSerial(self, logLevel=logging.DEBUG): self.serialLogin(logLevel) cli = bigtest.cli.Cli(self.serialConsole(logLevel)) cli.gotoBashMode() output = cli.runCmd("ifconfig eth0") m = re.search(r"inet addr:([^\s]+)", output, re.M) bigtest.Assert(m and m.group(1) != "") return m.group(1)
def shutdown(self, delay=0, waitForState=False): cli = self.cli(logging.DEBUG) cli.gotoBashMode() cli.runCmd("sudo shutdown -h %d" % delay) if waitForState: bigtest.waitForProcessToStop(self.pid())
def reboot(self): cli = self.cli(logging.DEBUG) cli.gotoBashMode() cli.runCmd("sudo reboot")
def shutdown(self, delay=0): cli = self.cli(logging.DEBUG) cli.gotoBashMode() cli.runCmd("sudo shutdown -h %d" % delay)