emulator.py 文件源码

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

项目:Redfish-Interface-Emulator 作者: DMTF 项目源码 文件源码
def init_resource_manager():
    """
    Initializes the resource manager
    """
    global resource_manager
    global REST_BASE
    global TRAYS
    global SPEC
    resource_manager = ResourceManager(REST_BASE, SPEC,MODE,TRAYS)

    # If POPULATE is specified in emulator-config.json, INFRAGEN is called to populate emulator (i.e. with Chassi, CS, Resource Blocks, etc) according to specified file
    try:
        POPULATE
    except:
        pass
    else:
        if os.path.exists(POPULATE):
            with open(POPULATE, 'r') as f:
                infragen_config = json.load(f)
            populate(infragen_config.get('POPULATE',10))

    resource_dictionary = ResourceDictionary()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号