Get detailed information about a local package repository.

    :param str name: The name of the local repository.
    :param str config_path: The path to the configuration file for the aptly instance.
    :param bool with_packages: Return a list of packages in the repo.

    :return: A dictionary containing information about the repository.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.get_repo name="test-repo"

def get_repo(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
    '''
    Get detailed information about a local package repository.

    :param str name: The name of the local repository.
    :param str config_path: The path to the configuration file for the aptly instance.
    :param bool with_packages: Return a list of packages in the repo.

    :return: A dictionary containing information about the repository.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.get_repo name="test-repo"
    '''
    _validate_config(config_path)
    with_packages = six.text_type(bool(with_packages)).lower()

    ret = dict()
    cmd = ['repo', 'show', '-config={}'.format(config_path),
           '-with-packages={}'.format(with_packages), name]

    cmd_ret = _cmd_run(cmd)

    ret = _parse_show_output(cmd_ret=cmd_ret)

    if ret:
        log.debug('Found repository: %s', name)
    else:
        log.debug('Unable to find repository: %s', name)

    return ret