def get_repo_url(repository):
    """
    Functions return URL for repository passed as parameter
    :param repository: object representing Repository model
    :return: str - concatenated URL
    """
    url_data = {
        'protocol': repository.protocol.lower(),
        'user': ''.join((repository.user, '@')) if repository.user else '',
        'host': repository.host.lower(),
        'port': ''.join((':', str(repository.port))) if repository.port else '',
        'repo': ''.join(('/', repository.repo_remote_path))
    }
    return '{protocol}://{user}{host}{port}{repo}'.format(**url_data)