config_tools: support add vm_type for a new Service VM

For vm_type is a required property, support set vm_type to a new added
Service VM.

Signed-off-by: Zhao <yuanyuan.zhao@intel.com>
This commit is contained in:
Zhao 2022-05-31 09:41:27 +08:00 committed by acrnsi-robot
parent c32b182958
commit ea8651cbd6
1 changed files with 8 additions and 1 deletions

View File

@ -211,7 +211,14 @@ export default {
}
}
if (this.currentFormData['load_order'] === 'SERVICE_VM') {
delete this.currentFormSchema.BasicConfigType.properties.vm_type
if (this.currentFormData.hasOwnProperty('vm_type')) {
delete this.schemas.ServiceVM.BasicConfigType.properties.vm_type
} else {
if (this.schemas.ServiceVM.BasicConfigType.properties.hasOwnProperty('vm_type') === false) {
this.schemas.ServiceVM.BasicConfigType.properties.vm_type =
{$ref: '#/definitions/BasicVMType', title: 'VM type', description: '<p>Select the VM type. A standard VM (<span class=…ial features for time-sensitive applications.</p>'}
}
}
}
},
switchTab(tabVMID) {