Removes all labels for a given client.

    Args:
      client_id: The client_id.
      labels: A list of labels to remove.
11500
def RemoveClientLabels(self, client_id, labels):
    
    for label in labels:
      keyword = self._NormalizeKeyword(label)
      # This might actually delete a keyword with the same name as the label (if
      # there is one).
      data_store.REL_DB.RemoveClientKeyword(client_id, keyword)
      data_store.REL_DB.RemoveClientKeyword(client_id, "label:%s" % keyword)
419944
def remove(cls, name):
        

        api = Client.instance().api

        api.collection(name).delete()
270518
def RemoveClientLabels(self, client, labels_names):
    """"""

    affected_owners = set()
    for label in client.GetLabels():
      if label.name in labels_names and label.owner != "GRR":
        affected_owners.add(label.owner)

    for owner in affected_owners:
      client.RemoveLabels(labels_names, owner=owner)
361695
def oauth_client_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/oauth/clients/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
809470
def remove_label(self, name):
        
        url = self._build_url('labels', name, base_url=self._api)
        # Docs say it should be a list of strings returned, practice says it
        # is just a 204/404 response. I'm tenatively changing this until I
        # hear back from Support.
        return self._boolean(self._delete(url), 204, 404)
384109
def remove(client, name):
    """"""
    from renku.models.refs import LinkReference
    LinkReference(client=client, name=_ref(name)).delete()
627747
def delete_client():
    """"""
    preserve_cache = request.args.get('preserve_cache', False)
    delete_client(g.client_id, preserve_cache)
    return jsonify({'Success': True})
587887
def ReadAllClientLabels(self, cursor=None):
    """"""

    cursor.execute("SELECT DISTINCT owner_username, label FROM client_labels")

    result = []
    for owner, label in cursor.fetchall():
      result.append(rdf_objects.ClientLabel(name=label, owner=owner))

    result.sort(key=lambda label: (label.owner, label.name))
    return result
418347
def delete(self):
        

        return self._client._delete(
            self.__class__.base_url(
                self.sys['id']
            )
        )
524264
def AddClientLabels(self, client_id, owner, labels, cursor=None):
    """"""
    cid = db_utils.ClientIDToInt(client_id)
    labels = set(labels)
    args = [(cid, mysql_utils.Hash(owner), owner, label) for label in labels]
    args = list(collection.Flatten(args))

    query = """
          INSERT IGNORE INTO client_labels
              (client_id, owner_username_hash, owner_username, label)
          VALUES {}
          """.format(", ".join(["(%s, %s, %s, %s)"] * len(labels)))
    try:
      cursor.execute(query, args)
    except MySQLdb.IntegrityError as e:
      raise db.UnknownClientError(client_id, cause=e)
1339489
def remove_label(self, label):
        
        self._logger.info('Removing label "{}"'.format(label))
        count = self._matches[constants.LABEL_FIELDNAME].value_counts().get(
            label, 0)
        self._matches = self._matches[
            self._matches[constants.LABEL_FIELDNAME] != label]
        self._logger.info('Removed {} labelled results'.format(count))
1054394
def destroy_label(self, label, callback=dummy_progress_cb):
        
        current = 0
        total = self.index.get_nb_docs()
        self.index.start_destroy_label(label)
        while True:
            (op, doc) = self.index.continue_destroy_label()
            if op == 'end':
                break
            callback(current, total, self.LABEL_STEP_DESTROYING, doc)
            current += 1
        self.index.end_destroy_label()
82052
function _cmdClose(clientId) {
    var client = _clients[clientId];
    if (client) {
        client.socket.close();
        delete _clients[clientId];
    }
}
243759
def MultiReadClientLabels(self, client_ids, cursor=None):
    """"""

    int_ids = [db_utils.ClientIDToInt(cid) for cid in client_ids]
    query = ("SELECT client_id, owner_username, label "
             "FROM client_labels "
             "WHERE client_id IN ({})").format(", ".join(["%s"] *
                                                         len(client_ids)))

    ret = {client_id: [] for client_id in client_ids}
    cursor.execute(query, int_ids)
    for client_id, owner, label in cursor.fetchall():
      ret[db_utils.IntToClientID(client_id)].append(
          rdf_objects.ClientLabel(name=label, owner=owner))

    for r in itervalues(ret):
      r.sort(key=lambda label: (label.owner, label.name))
    return ret
52891
def DeleteClientActionRequests(self, requests):
    """"""
    if not requests:
      return

    to_delete = []
    for r in requests:
      to_delete.append((r.client_id, r.flow_id, r.request_id))

    if len(set(to_delete)) != len(to_delete):
      raise ValueError(
          "Received multiple copies of the same message to delete.")

    self._DeleteClientActionRequest(to_delete)
1350917
def delete_client(client_id, preserve_cache):
    
    if client_id in drivers:
        drivers.pop(client_id).quit()
        try:
            timers[client_id].stop()
            timers[client_id] = None
            release_semaphore(client_id)
            semaphores[client_id] = None
        except:
            pass

    if not preserve_cache:
        pth = CHROME_CACHE_PATH + g.client_id
        shutil.rmtree(pth)
163058
def delete(self, id):
        
        resp = self.client.accounts.delete(id)
        self.display(resp)