config-tools: check if the cpu_affinity is null
The cpu_affinity is null when creating a new scenario. Do not update the pcpu properties if the cpu_affinity is null. Tracked-On: #8145 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
parent
6a1acd7b5e
commit
914e7a1d25
|
@ -347,7 +347,7 @@ export default {
|
|||
},
|
||||
updateCpuAffinity(vmid) {
|
||||
this.scenario.vm.map((vmConfig, vmIndex) => {
|
||||
if (vmConfig['@id'] === vmid) {
|
||||
if (vmConfig['@id'] === vmid && vmConfig['cpu_affinity'] != null) {
|
||||
for (let i = 0; i < vmConfig['cpu_affinity']['pcpu'].length; i++) {
|
||||
this.scenario.vm[vmIndex]['cpu_affinity']['pcpu'][i]['real_time_vcpu'] = 'n'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue