Remove specified SSH public key from specified user.
558741
def remove(self, username, user_api, filename=None, force=False):
        """"""
        self.keys = API.__get_keys(filename)
        self.username = username
        user = user_api.find(username)[0]

        if not force:  # pragma: no cover
            self.__confirm()

        for key in self.__delete_keys():
            operation = {'sshPublicKey': [(ldap3.MODIFY_DELETE, [key])]}
            self.client.modify(user.entry_dn, operation)
674978
def delete(self, key):
        """"""
        if self.servers:
            key = self._qualified_key(key)
            hashed_key = self.key_hasher(key)
            self.client.delete(hashed_key)
753256
def auth_remove(name, drop, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('auth:group:remove', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'drop': drop,
    })
1163087
def delete(*keys, **connection_args):
    '''
    
    '''
    # Get connection args from keywords if set
    conn_args = {}
    for arg in ['host', 'port', 'db', 'password']:
        if arg in connection_args:
            conn_args[arg] = connection_args[arg]

    server = _connect(**conn_args)
    return server.delete(*keys)
162505
def pop(self, key):
        """"""
        arr = dict.pop(self, key).copy()
        self.remover(key)
        return arr
609755
def remove_uid(self, uid):
        
        for sid in self.get('uid2sid', uid):
            self.remove('sid2uid', sid, uid)
        self.delete('uid2sid', uid)
882906
def remove_server(self, name):
        """"""
        for i in self._server_list:
            if i['key'] == name:
                try:
                    self._server_list.remove(i)
                    logger.debug("Remove server %s from the list" % name)
                    logger.debug("Updated servers list (%s servers): %s" % (
                        len(self._server_list), self._server_list))
                except ValueError:
                    logger.error(
                        "Cannot remove server %s from the list" % name)
1157122
def user_remove(username, **kwargs):
    '''
    
    '''
    # 'database' argument is mandatory
    if 'database' not in kwargs:
        return False
    try:
        conn = _get_connection(**kwargs)
        conn.autocommit(True)
        cur = conn.cursor()
        cur.execute("DROP USER {0}".format(username))
        conn.autocommit(False)
        conn.close()
        return True
    except Exception as e:
        return 'Could not create the user: {0}'.format(e)
1314549
protected void removeInvalidLogins(String userName, String remoteAddress) {

        if (m_maxBadAttempts < 0) {
            // invalid login storage is disabled
            return;
        }

        String key = createStorageKey(userName, remoteAddress);
        // just remove the user from the storage
        m_storage.remove(key);
    }
353768
def remove_kv_store(self, key):
        
        data = {
            'operation': 'DELETE',
            'key': key
        }
        return self.post(self.make_url("/useragent-kv"), data=to_json(data),
                         headers=self.default_headers).text
1266158
def ssh_session(key_filename,
                username,
                ip_address,
                *cli):
    
    local('ssh -t -i %s %s@%s %s' % (key_filename,
                                     username,
                                     ip_address,
                                     "".join(chain.from_iterable(cli))))
81843
def remove(self, *args):
        

        key = self.get_storage_key(*args)
        pk = self.instance.pk.get()
        logger.debug("removing %s from index %s" % (pk, key))
        self.connection.srem(key, pk)
        self._deindexed_values.add(tuple(args))
772961
def _RemoveUsers(self, remove_users):
    
    for username in remove_users:
      self.utils.RemoveUser(username)
      self.user_ssh_keys.pop(username, None)
    self.invalid_users -= set(remove_users)
823049
def remove_tenant_user(request, project=None, user=None, domain=None):
    """"""
    client = keystoneclient(request, admin=True)
    roles = client.roles.roles_for_user(user, project)
    for role in roles:
        remove_tenant_user_role(request, user=user, role=role.id,
                                project=project, domain=domain)
1343844
def prj_remove_user(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        i = self.prj_user_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            user = item.internal_data()
            log.debug("Removing user %s.", user.username)
            item.set_parent(None)
            self.cur_prj.users.remove(user)
1248510
def remove_from_known_hosts(self, hosts, known_hosts=DEFAULT_KNOWN_HOSTS, dry=False):
        
        for host in hosts:
            logger.info('[%s] Removing the remote host SSH public key from [%s]...', host.hostname, known_hosts)
            cmd = ['ssh-keygen', '-f', known_hosts, '-R', host.hostname]
            logger.debug('Call: %s', ' '.join(cmd))
            if not dry:
                try:
                    subprocess.check_call(cmd)
                except subprocess.CalledProcessError as ex:
                    logger.error(format_error(format_exception(ex)))
1068939
def delete(self, key_id=None):
        
        url = self.bitbucket.url('DELETE_SSH_KEY', key_id=key_id)
        return self.bitbucket.dispatch('DELETE', url, auth=self.bitbucket.auth)