Reboot a linode.

    .. versionadded:: 2015.8.0

    name
        The name of the VM to reboot.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a reboot vm_name

def reboot(name, call=None):
    '''
    Reboot a linode.

    .. versionadded:: 2015.8.0

    name
        The name of the VM to reboot.

    CLI Example:

    .. code-block:: bash

        salt-cloud -a reboot vm_name
    '''
    if call != 'action':
        raise SaltCloudException(
            'The show_instance action must be called with -a or --action.'
        )

    node_id = get_linode_id_from_name(name)
    response = _query('linode', 'reboot', args={'LinodeID': node_id})
    data = _clean_data(response)
    reboot_jid = data['JobID']

    if not _wait_for_job(node_id, reboot_jid):
        log.error('Reboot failed for %s.', name)
        return False

    return data