Get all keys currently stored in etcd.
549104
def get_all_response(self, sort_order=None, sort_target='key',
                         keys_only=False):
        """"""
        range_request = self._build_get_range_request(
            key=b'\0',
            range_end=b'\0',
            sort_order=sort_order,
            sort_target=sort_target,
            keys_only=keys_only,
        )

        return self.kvstub.Range(
            range_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )
1346567
private function getAllChildKeys($data, $maps, $parent_keys, $parent_types, & $result, & $keys, $current_key = [], $current_type = null) {
		if ($current_type == '11') {
			$data = ['__11__' => $data];
		}
		foreach ($data as $k => $v) {
			$new_key = $current_key;
			if ($current_type != '11') {
				$new_key[] = $k;
			}
			if (count($parent_keys) == 1) {
				$new_key[] = $parent_keys[0];
				// put values into result
				$result[] = $new_key;
				// generate keys
				$temp = [];
				foreach ($maps[0] as $k3 => $v3) {
					$temp[] = $v[$k3];
				}
				// we need to preserve a data type if its just one column key
				if (count($temp) == 1) {
					$keys[] = $temp[0];
				} else {
					$keys[] = implode('::', $temp);
				}
			} else {
				// remove extra level
				$parent_keys_temp = $parent_keys;
				$v2 = array_shift($parent_keys_temp);
				$parent_types_temp = $parent_types;
				array_shift($parent_types_temp);
				$maps_temp = $maps;
				array_shift($maps_temp);
				// generate key
				$new_key[] = $v2;
				$this->getAllChildKeys($v[$v2], $maps_temp, $parent_keys_temp, $parent_types_temp, $result, $keys, $new_key, $parent_types[0]);
			}
		}
	}
1248769
def unused_keys(self):
        """"""
        unused = set()
        for k, c in self._children.items():
            if isinstance(c, ConfigNode):
                if not c.has_been_accessed():
                    unused.add(k)
            else:
                for ck in c.unused_keys():
                    unused.add(k+'.'+ck)
        return unused
434861
def keys(self):
        """"""
        s = set()
        for config in self.__configs:
            s |= config.keys()
        return s
601793
def _get_redis_keys_opts():
    '''
    
    '''
    return {
        'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX),
        'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX),
        'key_prefix': __opts__.get('cache.redis.key_prefix', _KEY_PREFIX),
        'separator': __opts__.get('cache.redis.separator', _SEPARATOR)
    }
165688
def iterkeys(self):
        """"""
        patterns = self.patterns
        replace = self.replace
        seen = set()
        for key in six.iterkeys(self.base):
            for pattern in patterns:
                m = pattern.match(key)
                if m:
                    ret = m.group('key') if replace else m.group()
                    if ret not in seen:
                        seen.add(ret)
                        yield ret
                    break
        for key in DictMethods.iterkeys(self):
            if key not in seen:
                yield key
888205
def public_keys(self):
        """"""
        if not self.public_keys_cache:
            conn = self.conn_factory()
            self.public_keys_cache = conn.export_public_keys(self.identities)
        return self.public_keys_cache
1026170
def getall(self, key, default=_marker):
        """"""
        identity = self._title(key)
        res = [v for i, k, v in self._impl._items if i == identity]
        if res:
            return res
        if not res and default is not _marker:
            return default
        raise KeyError('Key not found: %r' % key)
913404
def list_keys(self):
        '''
        
        '''
        key_dirs = self._check_minions_directories()

        ret = {}

        for dir_ in key_dirs:
            if dir_ is None:
                continue
            ret[os.path.basename(dir_)] = []
            try:
                for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(dir_)):
                    if not fn_.startswith('.'):
                        if os.path.isfile(os.path.join(dir_, fn_)):
                            ret[os.path.basename(dir_)].append(
                                salt.utils.stringutils.to_unicode(fn_)
                            )
            except (OSError, IOError):
                # key dir kind is not created yet, just skip
                continue
        return ret
887093
def get_keys(self):
        '''
        
        '''
        # Make sure all key parent directories are accessible
        user = self.opts.get('user', 'root')
        salt.utils.verify.check_path_traversal(self.opts['pki_dir'], user)

        if not os.path.exists(self.rsa_path):
            log.info('Generating keys: %s', self.opts['pki_dir'])
            gen_keys(self.opts['pki_dir'],
                     'minion',
                     self.opts['keysize'],
                     self.opts.get('user'))
        key = get_rsa_key(self.rsa_path, None)
        log.debug('Loaded minion key: %s', self.rsa_path)
        return key
149829
def find_for_x_in_y_keys(node):
    """"""
    return (
        isinstance(node, ast.For)
        and h.call_name_is(node.iter, 'keys')
    )
558423
private void getResPathKeys(String[] keys, int depth) {
        ICUResourceBundle b = this;
        while (depth > 0) {
            keys[--depth] = b.key;
            b = b.container;
            assert (depth == 0) == (b.container == null);
        }
    }
497987
def get_all_keys(self):
        
        all_keys = []
        for keys in self._index.values():
            all_keys.extend(keys)
        return all_keys
191499
def lookup_ids(self, keys):
        """"""
        keys_len = len(keys)
        ids = {namespace_key: None for namespace_key in keys}
        start = 0
        bulk_insert = self.bulk_insert
        query = 'SELECT namespace, key, id FROM gauged_keys WHERE '
        check = '(namespace = %s AND key = %s) '
        cursor = self.cursor
        execute = cursor.execute
        while start < keys_len:
            rows = keys[start:start+bulk_insert]
            params = [param for params in rows for param in params]
            id_query = query + (check + ' OR ') * (len(rows) - 1) + check
            execute(id_query, params)
            for namespace, key, id_ in cursor:
                ids[(namespace, key)] = id_
            start += bulk_insert
        return ids
867264
def keys_at(self, x):
		
		return [key for key, segs in self.items() if x in segs]
682945
def keys(self, namespace, prefix=None, limit=None, offset=None):
        """"""
        params = [namespace]
        query = 'SELECT key FROM gauged_keys WHERE namespace = %s'
        if prefix is not None:
            query += ' AND key LIKE %s'
            params.append(prefix + '%')
        if limit is not None:
            query += ' LIMIT %s'
            params.append(limit)
        if offset is not None:
            query += ' OFFSET %s'
            params.append(offset)
        cursor = self.cursor
        cursor.execute(query, params)
        return [key for key, in cursor]
804948
def ls(bank):
    '''
    
    '''
    _init_client()
    query = "SELECT etcd_key FROM {0} WHERE bank='{1}'".format(
        _table_name, bank)
    cur, _ = run_query(client, query)
    out = [row[0] for row in cur.fetchall()]
    cur.close()
    return out