The names of CLI nodes/parameters modifiable?

Dear Team,

I am aware that the names of the CLI nodes and parameters are tied corresponding to the yang container, lists and leaves.
In CLI: – Lin(config)# dhcp defaultLeaseTime PT100S –
Understood that defaultLeaseTime is associated with the dhcpd yang file.

Now, my query is, whether the names and parameters can be modified without any name changes in yang file. If modifiable, where the name mapping needs to be done.
For instance,
Shall we change the parameter name “defaultLeaseTime” to our own name like “Def_Lease_Time” or something else. and i need to configure defaultLeaseTime like below:
Lin(config)# dhcp Def_Lease_Time PT100S

Actually Def_Lease_Time is the one which am expecting to map exactly to the defaultLeaseTime actually found in dhcpd yang file.

Thanks in advance.

Edit. Experts hinted to me that with the ConfD CLI you can use the tailf:alt-name YANG extension. See reply below.

Another, much more complicated :slight_smile: way is to add a second YANG module in which you with a different namespace make it identical to dhcpd.yang module where you just change the names you want to expose over the cli. Then add transform callpoints to the new YANG module and in code register the callpoints and using MAAPI map to the original module.
Now you can export the original module to be visible over NETCONF and the new one over CLI.

With both the ConfD Basic and Premium CLI you can use the tailf:alt-name YANG extension.

container dhcp {
    leaf defaultLeaseTime {
      tailf:alt-name "Def_Lease_Time";
      type xs:duration;
      default PT600S;
    }
...
}

From the ConfD yang extensions man page:

tailf:alt-name name
This property is used to specify an alternative name for the node in the CLI. It is used instead of the node
name in the CLI, both for input and output.
The alt-name statement can be used in: rpc, leaf, leaf-list, list, container, and refine.

Understood clearly. Thanks Cohult.