cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
34
Views
0
Helpful
1
Replies
Highlighted
Cisco Employee

Service Model Compile problems

Team,  I am going back through the NCS training and I am trying to compile the following yang, but I get errors.

bkelly@ubuntu:~/ncs-3.3/run/packages/l2vpn/src/yang$ pyang -p ../../../cisco-ios/src/ncsc-out/modules/yang:../../../cisco-iosxr/src/ncsc-out/modules/yang l2vpn.yang  <<< No errors

Pyang is unfortunately very lax on the embedded XPATH expressions, and that’s where the problem is hiding.

leaf loopback-address {    

config false;

type inet:ipv4-address;

tailf:link "/ncs:devices/ncs:device[ncs:name=current()/..device]/ncs:config/ios:interface/ios:Loopback[ios:name='0']/ios:ip/ios:primary/ios:address";

    }

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

There is a missing slash before “device" above, line 66 and again on 84. The line number mentioned in the error message unfortunately relates to an intermediate file generated by the compiler, which you somehow correctly located in the pyang test you did. We are in the process of rebuilding the compiler to make it faster and remove misleading error reports like this one. Planned for the next major NCS release in a couple of months.

View solution in original post

1 REPLY 1
Highlighted
Cisco Employee

There is a missing slash before “device" above, line 66 and again on 84. The line number mentioned in the error message unfortunately relates to an intermediate file generated by the compiler, which you somehow correctly located in the pyang test you did. We are in the process of rebuilding the compiler to make it faster and remove misleading error reports like this one. Planned for the next major NCS release in a couple of months.

View solution in original post

Content for Community-Ad
Cisco Community August2020 Spotlight Award Winners
This widget could not be displayed.