cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
245
Views
1
Helpful
1
Replies
michaelbonnettjr
Cisco Employee

Does NSO 4.4.x support multiple leafrefs within a union?

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.

1 REPLY 1
vsaruvas
Cisco Employee

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 -

YANG 1.1

ConfD NCS supports YANG 1.1, as defined in draft-ietf-netmod-rfc6020bis-12, with the following exceptions:

  • Type empty in unions and in list keys is not supported.
  • Type leafref in unions are not validated, and treated as a string internally.
  • anydata is not supported.
  • The new scoping rules for submodules are not implemented. Specifically, a submodule must still include other submodules in order to access definitions defined there.
  • Inline notification statements are handled by the compiler, but not supported in the APIs.
  • The new XPath functions derived-from() and derived-from-or-self() can only be using with literal strings in the second argument.
  • Leafref paths without prefixes in top-level typedefs are handled as in YANG 1.

HTH