.. versionadded:: 2019.2.0

    Return the merge diff, as text, after merging the merge config into the
    configuration source requested (without loading the config on the device).

    source: ``running``
        The configuration type to retrieve from the network device. Default:
        ``running``. Available options: ``running``, ``startup``, ``candidate``.

    merge_config
        The config to be merged into the initial config, sent as text. This
        argument is ignored when ``merge_path`` is set.

    merge_path
        Absolute or remote path from where to load the merge configuration
        text. This argument allows any URI supported by
        :py:func:`cp.get_url <salt.modules.cp.get_url>`), e.g., ``salt://``,
        ``https://``, ``s3://``, ``ftp:/``, etc.

    saltenv: ``base``
        Salt fileserver environment from which to retrieve the file.
        Ignored if ``merge_path`` is not a ``salt://`` URL.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.config_merge_diff merge_path=salt://path/to/merge.cfg

def config_merge_diff(source='running',
                      merge_config=None,
                      merge_path=None,
                      saltenv='base'):
    '''
    .. versionadded:: 2019.2.0

    Return the merge diff, as text, after merging the merge config into the
    configuration source requested (without loading the config on the device).

    source: ``running``
        The configuration type to retrieve from the network device. Default:
        ``running``. Available options: ``running``, ``startup``, ``candidate``.

    merge_config
        The config to be merged into the initial config, sent as text. This
        argument is ignored when ``merge_path`` is set.

    merge_path
        Absolute or remote path from where to load the merge configuration
        text. This argument allows any URI supported by
        :py:func:`cp.get_url <salt.modules.cp.get_url>`), e.g., ``salt://``,
        ``https://``, ``s3://``, ``ftp:/``, etc.

    saltenv: ``base``
        Salt fileserver environment from which to retrieve the file.
        Ignored if ``merge_path`` is not a ``salt://`` URL.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.config_merge_diff merge_path=salt://path/to/merge.cfg
    '''
    config_txt = __salt__['net.config'](source=source)['out'][source]
    return __salt__['iosconfig.merge_diff'](initial_config=config_txt,
                                            merge_config=merge_config,
                                            merge_path=merge_path,
                                            saltenv=saltenv)