diff --git a/src/klish-plugin-infix/xml/infix.xml b/src/klish-plugin-infix/xml/infix.xml index 7873180c..7191cbe4 100644 --- a/src/klish-plugin-infix/xml/infix.xml +++ b/src/klish-plugin-infix/xml/infix.xml @@ -286,9 +286,8 @@ - sysrepocfg -d operational -X -f json -x \ - /ietf-system:system-state/infix-system:ntp | \ - /usr/libexec/statd/cli-pretty "show-ntp" + sysrepocfg -d operational -X -f json -x /system-state/ntp | \ + /usr/libexec/statd/cli-pretty "show-ntp" diff --git a/src/statd/python/cli_pretty/cli_pretty.py b/src/statd/python/cli_pretty/cli_pretty.py index ec34da38..25e5e92e 100755 --- a/src/statd/python/cli_pretty/cli_pretty.py +++ b/src/statd/python/cli_pretty/cli_pretty.py @@ -1020,8 +1020,8 @@ def show_hardware(json): def show_ntp(json): if not json.get("ietf-system:system-state"): - print(f"Error, top level \"ietf-system:system-state\" missing") - sys.exit(1) + print("NTP client not enabled.") + return hdr = (f"{'ADDRESS':<{PadNtpSource.address}}" f"{'MODE':<{PadNtpSource.mode}}" f"{'STATE':<{PadNtpSource.state}}"