[PATCH 1/2] config_tools: hide tty and sock in UI


Kunhui Li
 

1. update schema_slicer.py to slice xs:sequence elements.
2. update backend type to "BasicVirtioConsoleBackendType" to call the
sliced value.

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@...>
---
.../pages/Config/ConfigForm/CustomWidget/Virtio/Console.vue | 2 +-
misc/config_tools/scenario_config/schema_slicer.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)

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/scenario_config/schema_slicer.py b/misc/config_tools/scenario_config/schema_slicer.py
index 26f29fed8..a7232b659 100755
--- a/misc/config_tools/scenario_config/schema_slicer.py
+++ b/misc/config_tools/scenario_config/schema_slicer.py
@@ -107,6 +107,10 @@ class SchemaTypeSlicer:
if element_list_node is not None:
sliced = self.slice_element_list(element_list_node, new_nodes)

+ element_list_node = self.get_node(new_type_node, "xs:sequence")
+ if element_list_node is not None:
+ sliced = self.slice_element_list(element_list_node, new_nodes)
+
restriction_node = self.get_node(new_type_node, "xs:restriction")
if restriction_node is not None:
sliced = self.slice_restriction(restriction_node)
--
2.25.1

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