summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfmertz <fireboxled@gmail.com>2020-06-28 20:36:19 +0000
committerfmertz <fireboxled@gmail.com>2020-07-05 14:57:52 +0000
commitf3e0a409ee01e1b3ffa0c9a267434a7725f61231 (patch)
tree5d740a28a19428edca1a23e478fdcfe9986323f1
parent3e8b6841db6ab803b898376754b469954d212cf7 (diff)
downloadvyos-1x-f3e0a409ee01e1b3ffa0c9a267434a7725f61231.tar.gz
vyos-1x-f3e0a409ee01e1b3ffa0c9a267434a7725f61231.zip
system display: T2564: Replace "config (enabled|disabled)" with "display disabled"
* interface-definitions/system-display.xml.in system disply disabled * src/conf_mode/system-display.py system display disabled
-rw-r--r--interface-definitions/system-display.xml.in26
-rwxr-xr-xsrc/conf_mode/system-display.py2
2 files changed, 7 insertions, 21 deletions
diff --git a/interface-definitions/system-display.xml.in b/interface-definitions/system-display.xml.in
index ac9f17b6c..afa6dba10 100644
--- a/interface-definitions/system-display.xml.in
+++ b/interface-definitions/system-display.xml.in
@@ -2,7 +2,6 @@
<interfaceDefinition>
<!--
system display model (sdec|ezio)
- system display config (enabled|disabled)
system display show host (cpu|cpu-all|cpu-hist|disk|load-hist|memory|proc|uptime)
network interface <intName> alias <alias>
units (bps|Bps|pps)
@@ -12,6 +11,7 @@
system display duration <s>
system display hello <string>
system display bye <string>
+ system display disabled
-->
<node name="system">
<children>
@@ -42,27 +42,13 @@
</valueHelp>
</properties>
</leafNode><!--system display model-->
- <!-- system display config (enabled|disabled) -->
- <leafNode name="config">
+ <!-- system display disabled -->
+ <leafNode name="disabled">
<properties>
- <help>Configuration status</help>
- <completionHelp>
- <list>enabled disabled</list>
- </completionHelp>
- <constraint>
- <regex>(enabled|disabled)</regex>
- </constraint>
- <constraintErrorMessage>Invalid system display config status</constraintErrorMessage>
- <valueHelp>
- <format>enabled</format>
- <description>Turn system display configuration ON</description>
- </valueHelp>
- <valueHelp>
- <format>disabled</format>
- <description>Turn system display configuration OFF</description>
- </valueHelp>
+ <help>Disable sytem display</help>
+ <valueless/>
</properties>
- </leafNode><!--system display config-->
+ </leafNode><!--system display disabled-->
<node name="show">
<properties>
<help>Select the screens for the system display [REQUIRED]</help>
diff --git a/src/conf_mode/system-display.py b/src/conf_mode/system-display.py
index 4db375d8e..e30d591cc 100755
--- a/src/conf_mode/system-display.py
+++ b/src/conf_mode/system-display.py
@@ -66,7 +66,7 @@ def verify(c):
return None
def apply(c):
- if not c or c['config'] == 'disabled':
+ if not c or 'disabled' in c.keys():
# Stop client first
run('systemctl stop lcdproc.service')
# Stop server next