I have built CLI to correspond to my YANG model and it works great for scalars/leafs. I can’t figure out how to configure any items that are a list type object.
servers{
list server{
key "address"
leaf address {
type leafref {
path "../config/address"
}
...
etc.
I have tried every combination I can think of via CLI to configure this and can’t seem to figure it out.
I just need a primer on how to enter a list type value at CLI:
system dns servers server address 172.28.100.100
^
%Invalid input detected at '^' marker.
(config)# servers server 172.28.100.100
If you add the tailf:cli-expose-key-name extension to the key leaf:
import tailf-common { prefix tailf; }
...
key "address";
leaf address {
type leafref {
path "../config/address"
}
tailf:cli-expose-key-name;
}
(config)# servers server address 172.28.100.100
Thanks, that is really helpful. I figured out that the biggest problem was that the IP address regular expression in the openconfig definitions is totally incorrect and so it was refusing it due to the regex saying it was a bad IP address. I removed the IP regex definition and it went through fine. Same is true for the openconfig IPv6 definitions. The expose key name is a really good tip, thanks!