config_tools: filter all pre launched pcpu for service vm's cat data
filter all pre launched pcpu for service vm's cat data Tracked-On: #6691 Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
This commit is contained in:
parent
73e8a2fcc9
commit
0c80f44383
|
@ -334,6 +334,7 @@ export default {
|
|||
*/
|
||||
let pcpu_vms = {}
|
||||
let serviceVM = null;
|
||||
let preLaunchedVMCPUIDs = [];
|
||||
|
||||
window.getCurrentScenarioData().vm.map((vmConfig) => {
|
||||
// if this vm is service vm, we got it and skip it
|
||||
|
@ -353,6 +354,11 @@ export default {
|
|||
|
||||
// now, we got pre/post vm config with cpu affinity data here
|
||||
|
||||
if (vmConfig.load_order === 'PRE_LAUNCHED_VM') {
|
||||
preLaunchedVMCPUIDs = preLaunchedVMCPUIDs.concat(vmConfig.cpu_affinity.pcpu)
|
||||
return;
|
||||
}
|
||||
|
||||
// if vcat is enabled in hv, we need to check current vm is enabled vcat
|
||||
// noinspection JSUnresolvedVariable
|
||||
if (
|
||||
|
@ -391,12 +397,11 @@ export default {
|
|||
let serviceVMCPUIndex = 0;
|
||||
let schemaData = window.getSchemaData()
|
||||
schemaData.HV.BasicConfigType.definitions.CPUAffinityConfiguration.properties.pcpu_id.enum.map((pcpu_id) => {
|
||||
if (pcpu_vms.hasOwnProperty(pcpu_id)) {
|
||||
if (pcpu_vms[pcpu_id].y.length !== 0) {
|
||||
// ignore pcpu_id which has rt vm enabled
|
||||
return
|
||||
// if pcpu_id in preLaunchedVMCPUIDs, it's used by pre launched vm, we need skip it
|
||||
if (preLaunchedVMCPUIDs.indexOf(pcpu_id) !== -1) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!pcpu_vms.hasOwnProperty(pcpu_id)) {
|
||||
pcpu_vms[pcpu_id] = {'y': [], 'n': []}
|
||||
}
|
||||
pcpu_vms[pcpu_id].n.push({
|
||||
|
|
Loading…
Reference in New Issue