def list_keys(self):
        '''
        Return a dict of managed keys and what the key status are
        '''

        key_dirs = []

        # We have to differentiate between RaetKey._check_minions_directories
        # and Zeromq-Keys. Raet-Keys only have three states while ZeroMQ-keys
        # havd an additional 'denied' state.
        if self.opts['transport'] in ('zeromq', 'tcp'):
            key_dirs = self._check_minions_directories()
        else:
            key_dirs = self._check_minions_directories()

        ret = {}

        for dir_ in key_dirs:
            ret[os.path.basename(dir_)] = []
            try:
                for fn_ in salt.utils.isorted(os.listdir(dir_)):
                    if not fn_.startswith('.'):
                        if os.path.isfile(os.path.join(dir_, fn_)):
                            ret[os.path.basename(dir_)].append(fn_)
            except (OSError, __HOLE__):
                # key dir kind is not created yet, just skip
                continue
        return ret
dataset/ETHPy150Open saltstack/salt/salt/key.py/Key.list_keys