Yes. Although I’m not sure exactly what you mean, what you have ought to work.
Another example:
module top {
yang-version 1.1;
namespace "http://tail-f.com/ns/example/top";
prefix top;
include s1;
include s2;
}
submodule s1 {
belongs-to top { prefix t; }
list network {
key name;
leaf name {
type string;
}
list another-list {
key name;
leaf name {
type string;
}
}
}
}
submodule s2 {
belongs-to top { prefix t2; }
include s1;
import tailf-common {
prefix tailf;
}
container xxx {
config false;
tailf:callpoint cp;
list network {
key name;
leaf name {
type leafref {
path "/network/name";
}
}
}
}
}
And when I login I get:
$ make cli
/home/jojohans/confd-6.4.2/bin/confd_cli --user=admin --groups=admin
–interactive || echo Exit
admin connected from 10.0.2.2 using ssh on lab
admin@lab> show xxx network
Error: application communication failure
[error][2017-07-11 12:23:51]
admin@lab>
(I get the “application communication failure” error because I didn’t implement the callpoint)
Here when the call-point is implemented. Does the network.name gets auto-filled using the leafref path or should one implement it explicitly thru the confd_get_next calls?