# Show leaf info with cli-drop-name extension

**URL:** <https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616>\
**Category:** Other Northbound Interfaces\
**Created:** [August 5, 2016, 8:07am UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616 "2016-08-05T08:07:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesZhang](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@JamesZhang](https://dmap-community.ductus.global/u/JamesZhang)\
**Post date:** [August 5, 2016, 8:07am UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616/1 "2016-08-05T08:07:18Z")

</div>

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:

```auto
  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:

```auto
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

```auto
    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:

```auto
[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:

```auto
[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

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [August 5, 2016, 8:59am UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616/2 "2016-08-05T08:59:29Z")

</div>

HI,

> [@JamesZhang](#):
>
> so is there any cli-extension allowing to display help information inline?

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

---

<div class="post-metadata">

**Author:** ![deepakg](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@deepakg](https://dmap-community.ductus.global/u/deepakg)\
**Post date:** [April 20, 2018, 7:47pm UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616/3 "2018-04-20T19:47:02Z")

</div>

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.**

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [April 21, 2018, 10:46pm UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616/4 "2018-04-21T22:46:02Z")

</div>

Hi,  
Is the “[tailf:info](https://discuss.tail-f.com/t/show-leaf-info-with-cli-drop-name-extension/616/2?u=cohult)” YANG extension not doing what you want?

---

<div class="post-metadata">

**Author:** ![deepakg](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@deepakg](https://dmap-community.ductus.global/u/deepakg)\
**Post date:** [April 23, 2018, 3:48pm UTC](https://dmap-community.ductus.global/t/show-leaf-info-with-cli-drop-name-extension/616/5 "2018-04-23T15:48:23Z")

</div>

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.
