diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue index bc3748b04..6d624859e 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config.vue @@ -214,16 +214,6 @@ export default { this.currentFormData = this.scenario.vm[i] } } - if (this.currentFormData['load_order'] === 'SERVICE_VM') { - 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: '

Select the VM type. A standard VM ('} - } - } - } }, switchTab(tabVMID) { this.activeVMID = tabVMID; diff --git a/misc/config_tools/scenario_config/jsonschema/converter.py b/misc/config_tools/scenario_config/jsonschema/converter.py index 8274c1bf0..47417b82a 100644 --- a/misc/config_tools/scenario_config/jsonschema/converter.py +++ b/misc/config_tools/scenario_config/jsonschema/converter.py @@ -189,15 +189,19 @@ class XS2JS: if 'xs:enumeration' in restriction: type_func = {"string": str, "integer": int}.get(js_st['type'], str) # enum + enum_elements = restriction['xs:enumeration'] + if not isinstance(enum_elements, list): + enum_elements = [enum_elements] + enum = [] - for enum_element in restriction['xs:enumeration']: + for enum_element in enum_elements: enum.append(type_func(enum_element['@value'])) js_st["enum"] = enum # enumNames - if enum and '@acrn:title' in restriction['xs:enumeration'][0].get('xs:annotation', {}): + if enum and '@acrn:title' in enum_elements[0].get('xs:annotation', {}): enum_names = [] - for enum_element in restriction['xs:enumeration']: + for enum_element in enum_elements: if 'xs:annotation' in enum_element and '@acrn:title' in enum_element.get('xs:annotation', {}): enum_names.append(enum_element['xs:annotation']['@acrn:title']) else: diff --git a/misc/config_tools/schema/VMtypes.xsd b/misc/config_tools/schema/VMtypes.xsd index 5caedefb6..e7feb48c0 100644 --- a/misc/config_tools/schema/VMtypes.xsd +++ b/misc/config_tools/schema/VMtypes.xsd @@ -22,13 +22,13 @@ Current supported VM types are: -- ``Real-time`` for time-sensitive applications. +- ``Real-time`` for time-sensitive applications (not applicable to the service VM). - ``Standard`` for general-purpose applications, such as human-machine interface (HMI). - - + +