コード例 #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
ファイル: vds_bootstrap_complete.py プロジェクト: ekohl/vdsm
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.")