def METHOD_NAME():
    """ Check the status of vm. """
    action = 'shutdown' if shutdown_vm else 'login'
    if not getattr(vm, 'wait_for_%s' % action)(timeout=362):
        test.fail('Failed to %s vm.' % action)
    test.log.info('%s vm successfully.', action.capitalize())