ConfD User Community

Hiding presence container config from show o/p

I have a requirement where i want to hide the presence container from the show o/p.

router(config)#sip-ua  
router(config-sip-ua)#transport ?
  tcp  Enable SIP User Agent in TCP Mode
  udp  Enable SIP User Agent in UDP Mode

router(config-sip-ua)#transport t
router(config-sip-ua)#transport tcp ?
  tls   Enable SIP User Agent in TLS over TCP mode (Default: All TLS versions
        with fallback)
  <cr>  <cr>

router(config-sip-ua)#transport tcp t
router(config-sip-ua)#transport tcp tls 
router(config-sip-ua)#do sh run | sec sip-ua 
sip-ua 
!
router(config-sip-ua)#transport tcp tls ?   
  v1.0  Enable TLS Version 1.0
  v1.1  Enable TLS Version 1.1
  v1.2  Enable TLS Version 1.2
  <cr>  <cr>

router(config-sip-ua)#transport tcp tls v1.0
router(config-sip-ua)#do sh run | sec sip-ua
sip-ua 
 transport tcp tls v1.0

Yang implementation:

container transport {
        description
          "Enable SIP UA transport for TCP/UDP";
        tailf:cli-incomplete-no;
        leaf udp {
          description
            "Enable SIP User Agent in UDP Mode";
          tailf:cli-boolean-no;
          tailf:cli-trim-default;
          type boolean;
          default true;
        }
        leaf tcp {
          description
            "Enable SIP User Agent in TCP Mode";
          tailf:cli-full-command;
          tailf:cli-boolean-no;
          tailf:cli-trim-default;
          type boolean;
          default true;
        }
        container tcp-tls {
          tailf:cli-drop-node-name;
          container tcp {
            description
              "Enable SIP User Agent in TCP Mode";
            tailf:cli-incomplete-no;
            container tls {
              description
                "Enable SIP User Agent in TLS over TCP mode (Default: All TLS versions with fallback)";
              presence true;
              tailf:cli-reset-container;
              leaf tls-version {
                tailf:cli-drop-node-name;
                type enumeration {
                  enum "v1.0" {
                    description
                      "Enable TLS Version 1.0";
                  }
                  enum "v1.1" {
                    description
                      "Enable TLS Version 1.1";
                  }
                  enum "v1.2" {
                    description
                      "Enable TLS Version 1.2";
                  }
                }
              }
            }
          }
        }
      }

As per this code I am able to hide tcp and udp but “transport tcp tls” still shown in show o/p, default and boolean doesn’t work under container. Any way to make it work ?

Try with tailf:cli-suppress-show-conf-path
Details can be found in the tailf_yang_cli_extensions(5) man page