mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
configurator: fix single vm scenario load issue
fix single vm scenario load issue Tracked-On: #6691 Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
This commit is contained in:
parent
578a482626
commit
3f1057b747
@ -268,6 +268,17 @@ export class ProgramLayer extends EventBase {
|
|||||||
let scenarioConfig = await this.xmlLayer.loadScenario(scenarioXMLPath)
|
let scenarioConfig = await this.xmlLayer.loadScenario(scenarioXMLPath)
|
||||||
this.initScenario()
|
this.initScenario()
|
||||||
this.scenarioData.hv = scenarioConfig.hv;
|
this.scenarioData.hv = scenarioConfig.hv;
|
||||||
|
if (scenarioConfig.hasOwnProperty('vm')) {
|
||||||
|
if (!_.isArray(scenarioConfig.vm)) {
|
||||||
|
if (_.isObject(scenarioConfig.vm)) {
|
||||||
|
scenarioConfig.vm = [scenarioConfig.vm]
|
||||||
|
} else {
|
||||||
|
console.log(scenarioConfig.vm);
|
||||||
|
debugger;
|
||||||
|
this.onScenarioDataUpdateEvent()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
scenarioConfig.vm.map((vmConfig, index) => {
|
scenarioConfig.vm.map((vmConfig, index) => {
|
||||||
let vmType = vmConfig.load_order
|
let vmType = vmConfig.load_order
|
||||||
if (!this.scenarioData.vm.hasOwnProperty(vmType)) {
|
if (!this.scenarioData.vm.hasOwnProperty(vmType)) {
|
||||||
@ -284,6 +295,7 @@ export class ProgramLayer extends EventBase {
|
|||||||
this.addVM(vmType, vmConfig)
|
this.addVM(vmType, vmConfig)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
this.onScenarioDataUpdateEvent()
|
this.onScenarioDataUpdateEvent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user