diff options
Diffstat (limited to 'test/data/interface_definitions')
| -rw-r--r-- | test/data/interface_definitions/login_sample.xml | 23 | ||||
| -rw-r--r-- | test/data/interface_definitions/system_sample.xml | 63 |
2 files changed, 86 insertions, 0 deletions
diff --git a/test/data/interface_definitions/login_sample.xml b/test/data/interface_definitions/login_sample.xml new file mode 100644 index 0000000..b74a415 --- /dev/null +++ b/test/data/interface_definitions/login_sample.xml @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="login" owner="login"> + <children> + <tagNode name="user"> + <properties> + <help>User name</help> + <constraint> + <regex>[a-z][a-zA-Z0-9]+</regex> + </constraint> + <constraintErrorMessage>User name must start with a letter and consist of letters and digits</constraintErrorMessage> + </properties> + <children> + <leafNode name="full-name"> + <properties> + <help>User full name</help> + </properties> + </leafNode> + </children> + </tagNode> + </children> + </node> +</interfaceDefinition> diff --git a/test/data/interface_definitions/system_sample.xml b/test/data/interface_definitions/system_sample.xml new file mode 100644 index 0000000..c6185c0 --- /dev/null +++ b/test/data/interface_definitions/system_sample.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="system"> + <children> + <node name="login" owner="login"> + <children> + <tagNode name="user"> + <keepChildOrder/> + <properties> + <help>User name</help> + <constraint> + <regex>[a-zA-Z][a-zA-Z0-9\-]+</regex> + </constraint> + <constraintErrorMessage>User name must start with a letter and consist of letters and digits</constraintErrorMessage> + </properties> + <children> + <leafNode name="full-name"> + <properties> + <help>User full name</help> + </properties> + </leafNode> + </children> + </tagNode> + <leafNode name="password"> + <properties> + <help>A password</help> + <secret/> + </properties> + </leafNode> + </children> + </node> + <leafNode name="host-name"> + <properties> + <constraint> + <regex>[a-zA-Z][a-zA-Z0-9\-]</regex> + </constraint> + </properties> + </leafNode> + <leafNode name="ntp-server"> + <properties> + <help>NTP server address</help> + <multi/> + </properties> + </leafNode> + <node name="options"> + <children> + <leafNode name="reboot-on-panic"> + <properties> + <help>Reboot automatically if kernel panic occurs</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="enable-dangerous-features"> + <properties> + <help>Enable dangerous features</help> + <hidden/> + </properties> + </leafNode> + </children> + </node> + </children> + </node> +</interfaceDefinition> |
