Show leaf info with cli-drop-name extension

Hi,
I would like to know if the leaf help information is displayed in confd c style cli if it is applied by cli-drop-name. normally it is OK, but if the parent container is annotated by cli-sequence-commands, it is different.
for example, my yang model is like this:

  container foo2 {
    leaf bar1 {
      type string;
      description "bar1 info";
    }
    leaf bar2 {
      type string;
      description "bar2 info";
    }
  }

there is no any cli extension annotation, so we can do it like this:

Entering configuration mode terminal
[local]h1(config)#foo2 ?
Possible completions:
  bar1   bar1 info
[local]h1(config)#foo2 bar1 ?
Possible completions:
  <string>
[local]h1(config)#foo2 bar1 abc ?
Possible completions:
  bar2   bar2 info
  <cr>
[local]h1(config)#foo2 bar1 abc bar2 ?
Possible completions:
  <string>
[local]h1(config)#foo2 bar1 abc bar2 bcd ?
Possible completions:
  <cr>
[local]h1(config)#foo2 bar1 abc bar2 bcd
[local]h1(config)#

leaf bar1 and bar2 help information is displayed in nature, but if the model snippet is annotated

    container foo2 {
      tailf:cli-sequence-commands;
      leaf bar1 {
        tailf:cli-drop-node-name;
        type string;
        description "bar1 info";
      }
      leaf bar2 {
        tailf:cli-drop-node-name;
        type string;
        description "bar2 info";
      }
    }

sequence commands work like this:

[local]h1(config)#foo2 ?
Possible completions:
  <string>
[local]h1(config)#foo2 abc ?
Possible completions:
  <string>  <cr>
[local]h1(config)#foo2 abc bcd ?
Possible completions:
  <cr>
[local]h1(config)#foo2 abc bcd

but it loses the help information.
so is there any cli-extension allowing to display help information inline?
for example:

[local]h1(config)#foo2 ?
Possible completions:
  <string>     bar1 info
[local]h1(config)#foo2 abc ?
Possible completions:
  <string>   bar2 info <cr>
[local]h1(config)#foo2 abc bcd ?
Possible completions:
  <cr>
[local]h1(config)#foo2 abc bcd

appreciate for any assistance

HI,

You can use the tailf:info YANG extension

    container foo2 {
      tailf:cli-sequence-commands;
      leaf bar1 {
        tailf:cli-drop-node-name;
        type string;
        description "bar1 info";
        tailf:info "bar1 info";
      }
      leaf bar2 {
        tailf:cli-drop-node-name;
        type string;
        description "bar2 info";
        tailf:info "bar2 info";
      }
    }

See

  • ConfD UG “Custom Help Texts and Error Messages”
  • in the CLI chapter under “Help texts”
  • in the confdc man page “–use-description”
  • “tailf:info” in the tailf_yang_extensions man page

Hi Cohult ,
I have a question related to this…
admin@cndev2% set dhcp
Possible completions:
SharedNetworks -
SubNets -

defaultLeaseTime - Default Lease Time.

logFacility -
maxLeaseTime - MaxLeaseTime
admin@cndev2% set dhcp defaultLeaseTime
Possible completions:
<duration (nYnMnDnHnMnS)>[600s]
admin@cndev2% set dhcp defaultLeaseTime ?
Description: Default Lease Time. new line
Possible completions:
<duration (nYnMnDnHnMnS)>[600s]
admin@cndev2% set dhcp defaultLeaseTime

I don’t want to print . in this line in last, at the same time, I want to have more info to display when ? is used on cli. please suggest
defaultLeaseTime - Default Lease Time.

Hi,
Is the “tailf:info” YANG extension not doing what you want?

No…
My requirement is very simple, let say I want to configure defaultLeaseTime for DHCP, and I want to have short description(Default Lease Time), which will be shown when user press space key after dhcp as seen below

admin@cndev2% set dhcp
Possible completions:
defaultLeaseTime - Default Lease Time

It will display description when pressed space key

admin@cndev2% set dhcp defaultLeaseTime
Possible completions:
  <duration (nYnMnDnHnMnS)>[600s]

Now my requirement is to display long description when user press ?

admin@cndev2% set dhcp defaultLeaseTime ?
Description: Default Lease Time 
**The defaultLeaseTime statement configures the default length of time in seconds for which a client can request and hold a lease**
Possible completions:
  <duration (nYnMnDnHnMnS)>[600s]
admin@cndev2% set dhcp defaultLeaseTime

I am NOT able to do this using tailf:info however I am available to achieve most of this using description like

description " Default Lease Time. 
The defaultLeaseTime statement configures the default length of time in seconds for which a client can request and hold a lease "

If I use description like above, it will display what I want but it has . in end of Default Lease Time.

admin@cndev2% set dhcp
Possible completions:
defaultLeaseTime - Default Lease Time.

As I don’t want to display . at end., please suggest how I can get rid of this . in end.