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()
评论列表
文章目录