def Reboot(act=1): """ Reboot. """ if act: print "<BSTRAP component='Reboot' status='OK'/>" deployUtil.reboot() else: print "<BSTRAP component='Reboot' status='FAIL'/>" sys.stdout.flush()
def Reboot(act=1): """ Reboot: Either reboots the machine or restarts the vdsmd service. """ logging.debug("Reboot: started.") action = 'Reboot' message = 'Rebooting machine' if (act==1): deployUtil.reboot() else: action = 'Restart' message = 'Restarting vdsmd service' deployUtil.setService("vdsmd", "restart") result = "<BSTRAP component='" + action + "' status='OK' message='" + message + "' />" logging.debug(result) print result sys.stdout.flush() logging.debug("Reboot: ended.")
def Reboot(act=1): """ Reboot: Either reboots the machine or restarts the vdsmd service. """ logging.debug("Reboot: started.") action = 'Reboot' message = 'Rebooting machine' if (act == 1): deployUtil.reboot() else: action = 'Restart' message = 'Restarting vdsmd service' deployUtil.setService("vdsmd", "restart") result = "<BSTRAP component='" + action + "' status='OK' message='" + \ message + "' />" logging.debug(result) print result sys.stdout.flush() logging.debug("Reboot: ended.")