Ensure that the endpoint for a service doesn't exist in Keystone catalog

    name
        The name of the service whose endpoints should not exist

    region (optional)
        The region of the endpoint.  Defaults to ``RegionOne``.

    interface
        The interface type, which describes the visibility
        of the endpoint. (for V3 API)

def endpoint_absent(name, region=None, profile=None, interface=None, **connection_args):
    '''
    Ensure that the endpoint for a service doesn't exist in Keystone catalog

    name
        The name of the service whose endpoints should not exist

    region (optional)
        The region of the endpoint.  Defaults to ``RegionOne``.

    interface
        The interface type, which describes the visibility
        of the endpoint. (for V3 API)
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': 'Endpoint for service "{0}"{1} is already absent'.format(name,
                      ', interface "{0}",'.format(interface) if interface is not None else '')}

    # Check if service is present
    endpoint = __salt__['keystone.endpoint_get'](name, region,
                                                 profile=profile,
                                                 interface=interface,
                                                 **connection_args)
    if not endpoint:
        return ret
    else:
        if __opts__.get('test'):
            ret['result'] = None
            ret['comment'] = 'Endpoint for service "{0}" will be deleted'.format(name)
            return ret
        # Delete service
        __salt__['keystone.endpoint_delete'](name, region,
                                             profile=profile,
                                             interface=interface,
                                             **connection_args)
        ret['comment'] = 'Endpoint for service "{0}"{1} has been deleted'.format(name,
                         ', interface "{0}",'.format(interface) if interface is not None else '')
        ret['changes']['endpoint'] = 'Deleted'
    return ret