cephprocesses.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:DeepSea 作者: SUSE 项目源码 文件源码
def _cached_roles(search):
    """
    Return the cached roles in a convenient structure.  Trust the cached
    values from the master pillar since a downed minion will be absent
    from any dynamic query.  Also, do not worry about downed minions that
    are outside of the search criteria.
    """
    pillar_util = salt.utils.master.MasterPillarUtil(search, "compound",
                                                     use_cached_grains=True,
                                                     grains_fallback=False,
                                                     opts=__opts__)

    cached = pillar_util.get_minion_pillar()
    roles = {}
    for minion in cached:
        if 'roles' in cached[minion]:
            for role in cached[minion]['roles']:
                roles.setdefault(role, []).append(minion)

    log.debug(pprint.pformat(roles))
    return roles.keys()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号