def METHOD_NAME(cls):
    if cls.config.connect:
        return
    path = cls.path_by_nick(cls.os_api, "os_poweroff")
    try:
        cls.curl(path, method='POST', timeout=0.5)
    except:
        pass
    retry = 10
    while cls.os_process.poll() == None:
        retry -= 1
        if retry == 0:
            raise Exception("Fail to shutdown server")
        time.sleep(1)