def validate_endpoint(endpoint_name):
    """
    Ensuring that the specified endpoint exists.
    :param endpoint_name:
    :return:
    """
    if endpoint_name:
        endpoint = endpoint_service.get_by_name(endpoint_name)

        if not endpoint:
            click.echo(f"[-] No endpoint found with name: {endpoint_name}")
            sys.exit(1)

        return endpoint

    Ensuring that the specified endpoint exists.
    :param endpoint_name:
    :return:
    
lemur/certificates/cli.py