'Delete a record.
:param record: Record to delete.
:type  record: :class:`Record`
:rtype: ``bool``'

def delete_record(self, record):

    action = '/v1/Network/DNS/Record/delete'
    data = json.dumps({'params': {'id': record.id}})
    try:
        response = self.connection.request(action=action, method='POST', data=data)
    except APIException:
        e = sys.exc_info()[1]
        if (e.error_class == 'LW::Exception::RecordNotFound'):
            raise RecordDoesNotExistError(record_id=record.id, driver=self, value=e.value)
        else:
            raise e
    return (record.id in response.objects)
