cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

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

michaelbonnettjr
Cisco Employee
Cisco Employee

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.

Who Me Too'd this topic