'Remove a lease from the cluster configuration.
:param unicode dataset_id: The dataset whose lease is being
removed.
:return: A ``Deferred`` firing with an ``EndpointResponse`` or
serializable JSON.'

@app.route('/configuration/leases/<dataset_id>', methods=['DELETE'])
@user_documentation(u'\n                                This    will    release    a    lease    on    a    dataset,    allowing    the    dataset    to    be\n                                moved    elsewhere,    deleted    and    otherwise    modified.    Releasing    the\n                                lease    does    not    modify    the    dataset    in    any    way,    it    simply    allows\n                                other    operations    to    do    so.\n                                ', header=u'Release    a    lease    on    a    dataset', examples=[u'release    a    lease'], section=u'dataset')
@structured(inputSchema={}, outputSchema={'$ref': '/v1/endpoints.json#/definitions/lease'}, schema_store=SCHEMAS)
def delete_lease(self, dataset_id):

    now = datetime.fromtimestamp(self.clock.seconds(), UTC)
    leases = self.persistence_service.get().leases
    dataset_id = UUID(dataset_id)
    lease = leases.get(dataset_id, None)
    if (lease is not None):
        d = update_leases((lambda leases: leases.release(dataset_id, lease.node_id)), self.persistence_service)
        d.addCallback((lambda _: lease_response(lease, now)))
        return d
    else:
        raise LEASE_NOT_FOUND
