Query on "list"

Hi,
i would like to create a list using the yang, as below

list servers
key ip-addr

leaf ip-addr
{
type ipv4-address
tailf: cli-full-command;
tailf: cli-full-no;
}

leaf port-num
{
type int
}

leaf protocol
{
type string
}

The objective is, the user has to enter the address, Based on the address he can enter the port and protocol. But when i tried the above i am able to see that command is not getting terminated at ip address, the cli is allowing the port-num and protocol to be entered in the same line itself. Which is not i wanted to do.

I want to terminate at ip-addr, then for that ip addr i want to enter the port and protocol, what mistake am i doing here ?

Hi Shafath,

I believe you want to move the “tailf:cli-full-command” to the list level. I assume you are using the ConfD Basic CLI or the ConfD C or I CLI and want to do something like this:

list servers {
  key ip-addr;

  tailf:cli-full-command;
  tailf:cli-full-no;

  leaf ip-addr
  {
    type inet:ip-address;
  }

  leaf port-num
  {
    type inet:port-number;
  }

  leaf protocol
  {
    type string;
  }
}

Quick demo:

$ confd_cli -u admin -C
admin connected
# config
Entering configuration mode terminal
(config)# servers 127.0.0.1
Possible completions:
  <cr>

It working… Thanks !!!

localhost(config)# no system monitor balaji 
Possible completions:
  <cr>
localhost(config)# no system monitor balaji 
------------------------------------------------------^
syntax error: incomplete path
localhost(config)# 

it shows <cr> but still throws error ?.  Please note one additional change to what cohult is in mine, all leaf node has tailf:cli-full-command;.

rgds
Balaji Kamal Kannadassan