ConfD User Community

How to get the value of idle timeout configured for cli

Hi team,

I wanted to get the value of this node ["/confdConfig/cli/idleTimeout"] in a shell script or python script.
When we set the value using cli “set idle-timeout 1800” it succeeds and sets the value.
It will be seen using “show cli”.

root@ubuntu 08:21:45> show cli
autowizard true;
complete-on-space true;
devtools false;
display-level 99999999;
history 100;
idle-timeout 1800;
ignore-leading-space false;
output {
    file terminal;
paginate true;
prompt1 \u@\h\M \t> ;
prompt2 \u@\h\M \t% ;
screen {
    length 31;
    width 116;
show {
    defaults false;
terminal screen;
timestamp disable;
[ok][2021-08-27 08:21:50]

The “best practice” way of doing so is to enable the confd_dyncfg.yang and expose it over MAAPI “system” context sessions only. I.e. compiling the confd_dyncfg.yang with the “--export none” confdc flag.

See ConfD UG Chapter “Storing ConfD configuration parameters in CDB”, the examples.confd/confdconf/dyncfg example, and the confdc(1) man page under “--export Agent ...” for details.