Re: [PATCH v2] config_tools: hide tty and sock in UI


Junjie Mao
 

Kunhui-Li <kunhuix.li@...> writes:

For virtio console, in order to hide tty and sock backend types,
change "xs:sequence" to "xs:all" in the XML schema
to slice the backend type list and update backend type to
"BasicVirtioConsoleBackendType" to call the sliced value.

v1-->v2:
1. change "xs:sequence" to "xs:all" in the XML schema
to slice the backend type list.
2. update the commit message.

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@...>
Reviewed-by: Junjie Mao <junjie.mao@...>

--
Best Regards
Junjie Mao

---
.../pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue | 2 +-
misc/config_tools/schema/VMtypes.xsd | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue
index bf4943cdd..f75ff9bc0 100644
--- a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue
+++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue
@@ -96,7 +96,7 @@ export default {
data() {
return {
ConsoleUseType: this.rootSchema.definitions['VirtioConsoleUseType']['enum'],
- ConsoleBackendType: this.rootSchema.definitions['VirtioConsoleBackendType']['enum'],
+ ConsoleBackendType: this.rootSchema.definitions['BasicVirtioConsoleBackendType']['enum'],
defaultVal: vueUtils.getPathVal(this.rootFormData, this.curNodePath)
};
},
diff --git a/misc/config_tools/schema/VMtypes.xsd b/misc/config_tools/schema/VMtypes.xsd
index 91fd76cd6..ea612e144 100644
--- a/misc/config_tools/schema/VMtypes.xsd
+++ b/misc/config_tools/schema/VMtypes.xsd
@@ -362,7 +362,7 @@ The size is a subset of the VM's total memory size specified on the Basic tab.</
</xs:simpleType>

<xs:complexType name="VirtioConsoleConfiguration">
- <xs:sequence>
+ <xs:all>
<xs:element name="use_type" type="VirtioConsoleUseType" minOccurs="0">
<xs:annotation acrn:title="Use type">
<xs:documentation>Specify device type in guest, ether HVC console when user config it as virtio console or /dev/vportXpY
@@ -389,7 +389,7 @@ device file when user config it as virtio serial port, which can be read and wri
<xs:documentation>The device path for the tty backend type.</xs:documentation>
</xs:annotation>
</xs:element>
- </xs:sequence>
+ </xs:all>
</xs:complexType>

<xs:complexType name="VirtioInputConfiguration">

Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.