r'''
    .. versionadded:: 2019.2.0

    Return a list of detailed matches, for the configuration blocks (parent-child
    relationship) whose parent respects the regular expressions configured via
    the ``parent_regex`` argument, and the child matches the ``child_regex``
    regular expression. The result is a list of dictionaries with the following
    keys:

    - ``match``: a boolean value that tells whether ``child_regex`` matched any
      children lines.
    - ``parent``: the parent line (as text).
    - ``child``: the child line (as text). If no child line matched, this field
      will be ``None``.

    .. note::
        This function is only available only when the underlying library
        `ciscoconfparse <http://www.pennington.net/py/ciscoconfparse/index.html>`_
        is installed. See
        :py:func:`ciscoconfparse module <salt.modules.ciscoconfparse_mod>` for
        more details.

    parent_regex
        The regular expression to match the parent configuration lines against.

    child_regex
        The regular expression to match the child configuration lines against.

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

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.config_filter_lines '^interface' 'ip address'
        salt '*' napalm.config_filter_lines '^interface' 'shutdown' source=candidate

def config_filter_lines(parent_regex, child_regex, source='running'):
    r'''
    .. versionadded:: 2019.2.0

    Return a list of detailed matches, for the configuration blocks (parent-child
    relationship) whose parent respects the regular expressions configured via
    the ``parent_regex`` argument, and the child matches the ``child_regex``
    regular expression. The result is a list of dictionaries with the following
    keys:

    - ``match``: a boolean value that tells whether ``child_regex`` matched any
      children lines.
    - ``parent``: the parent line (as text).
    - ``child``: the child line (as text). If no child line matched, this field
      will be ``None``.

    .. note::
        This function is only available only when the underlying library
        `ciscoconfparse <http://www.pennington.net/py/ciscoconfparse/index.html>`_
        is installed. See
        :py:func:`ciscoconfparse module <salt.modules.ciscoconfparse_mod>` for
        more details.

    parent_regex
        The regular expression to match the parent configuration lines against.

    child_regex
        The regular expression to match the child configuration lines against.

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

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.config_filter_lines '^interface' 'ip address'
        salt '*' napalm.config_filter_lines '^interface' 'shutdown' source=candidate
    '''
    config_txt = __salt__['net.config'](source=source)['out'][source]
    return __salt__['ciscoconfparse.filter_lines'](config=config_txt,
                                                   parent_regex=parent_regex,
                                                   child_regex=child_regex)