* YANG Leafref feature update
* Closer adherence to RFC 7950. Some of this is changed behavior, some is new feature.
* Essentially instead of looking at the referring leaf, context is referred(target) node
* Validation uses referred node
* Validation changed to use type of referred node, instead of just "string"
* Auto-cli
* Changed to use type of referred node for typecheck
* Completion uses referred node
* Required instance / less strict validation
* New: Leafrefs must refer to existing data leaf ONLY IF YANG `required-instance` is true
* Previous: All leafrefs must refer to existing data leaf node
* Fixed: [Autocli does not offer completions for leafref to identityref #254](https://github.com/clicon/clixon/issues/254)
This commit is contained in:
parent
8db716ca07
commit
980718178a
18 changed files with 1151 additions and 115 deletions
|
|
@ -59,12 +59,14 @@ module leafref{
|
|||
description "For testing leafref across augment and grouping";
|
||||
type leafref {
|
||||
path "/ex:sender/ex:name";
|
||||
require-instance true;
|
||||
}
|
||||
}
|
||||
typedef sender-ref-local {
|
||||
description "For testing leafref local";
|
||||
type leafref {
|
||||
path "/example:sender/example:name";
|
||||
require-instance true;
|
||||
}
|
||||
}
|
||||
list sender{
|
||||
|
|
@ -83,7 +85,6 @@ module leafref{
|
|||
description "top-level ref (right prefix)";
|
||||
type sender-ref-local;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
|
@ -113,6 +114,7 @@ module augment{
|
|||
leaf name{
|
||||
type leafref {
|
||||
path "/ex:sender/ex:name";
|
||||
require-instance true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue