06-28-2017 10:59 AM - edited 03-01-2019 03:54 AM
Hi,
It is my understanding that YANG 1.1 allows multiple leafrefs to be part of a union. However, the YANG below will not compile under NSO 4.4.1.3.
leaf GigE-interface-union {
tailf:info "Specify the PE to CE interface ";
type union {
type leafref{
path "ncs:devices/ncs:device[ncs:name=current()/../../name]/ncs:config/ios:interface/ios:GigabitEthernet/ios:name";
} //end leafref
type leafref {
path "/ncs:devices/ncs:device[ncs:name=current()/../../name]/ncs:config/xr:interface/xr:GigabitEthernet/xr:id";
} //end leafref
} // end union
} // end leaf GigE-interface-union
The make error message is: "error: the type leafref (defined at yang/l2vpn.yang:166) cannot be part of a union"
Thoughts?
Regards,
Michael Bonnett, Jr.
06-28-2017 07:06 PM
I don't think it supports multiple leafrefs in the current version. According to the ncsc man page, The YANG 1.1 support has some exceptions -
ConfD NCS supports YANG 1.1, as defined in draft-ietf-netmod-rfc6020bis-12, with the following exceptions:
empty
in unions and in list keys is not supported.leafref
in unions are not validated, and treated as a string internally.derived-from()
and derived-from-or-self()
can only be using with literal strings in the second argument.HTH
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide