Key leaf at the end of list


I have requirement that key of a list should be at the end is it allowed?

Given yang snippet below for reference:

list server {
key “ipv4 vrf”;
leaf ipv4 {
type inet:ipv4-address;
container details {

leaf vrf {
type string;

I want to display vrf information at the end of CLI and it is part of key.

How i can achieve it?


I would expect that proper combination of tailf:cli-prefix-key and tailf:cli-before-key can achieve that, did you try it? Two examples in the ConfD example set use that, you may want to have a look there.


Thanks for the response.
Yes i tried " tailf:cli-prefix-key and tailf:cli-before-key". These will work only if we have only leafs under list.
If we have another level (container) under list as per my example it wont work.


Hm, I can think of the following options then, not sure which one is better (or worse, actually):

  • tweak the data model so that it better suits your CLI requirements
  • put a text transform between ConfD and the CLI consumer.

Neither one is ideal, obviously.