示例#1
0
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()
示例#2
0
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()
示例#3
0
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.")
示例#4
0
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.")