cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
163
Views
5
Helpful
1
Replies
Highlighted
Beginner

Leafref from service to device NED config using CDM and NSO 5.3.1.1

Hi, I am using 5.2.0.3 and have not been able to leafref from a service into a NED config as shown above.  I understood that there was a known limitation in NSO 5 due to CDM. I am working on a port to NSO 5.3.1.1 and saw this in changes:

  • ncs: In CDM, service YANG models could not have references into device
    YANG models.

(ENG-21618)

 

I am trying to do something like:

https://community.cisco.com/t5/nso-developer-hub-discussions/yang-reference-to-device-platform/m-p/3993230/highlight/false#M4578

I have added a fragment similar to:

https://community.cisco.com/t5/nso-developer-hub-discussions/leafref-firewall-interface-in-service-template/m-p/4051957

 

I have been trying to replicate the above but I don't seem to be having any luck. I keep getting:

yang/slf-loadbalancers.yang:221: error: the node 'interface' from module 'tailf-ned-cisco-ios' (in node 'config' from 'tailf-ncs') is not found

The code is quite similar. The code is:

type leafref {
path "/ncs:devices/ncs:device[ncs:name=current()/../name]/ncs:config/ios:interface/ios:Loopback/ios:name";
}

Can you do me a favor and confirm whether ENG-21618 does what I was hoping it would or if I'm doing something obvious, I'd really appreciate a pointer.  The PDF for CDM Migration for NSO 5.3.1.1 does not have an example of this.

Thanks in  Advance,

Jim

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

Re: Leafref from service to device NED config using CDM and NSO 5.3.1.1

I tracked this down to a Makefile issue:

This fragment was based on the template in the Makefile:

 

YANGPATH += ../../f5-bigip-gen-3.9/src/ncsc-out/modules/yang \
../../f5-bigip-gen-3.9/src/yang

->

yang/loadbalancers.yang:185: error: the node 'ltm' from module 'tailf-ned-f5-bigip' (in node 'config' from 'tailf-ncs') is not found
make[1]: *** [../load-dir/slf-loadbalancers.fxs] Error 1

 

This pattern matched the template:

## Uncomment and patch the line below if you have a dependency to a NED
## or to other YANG files
# YANGPATH += ../../<ned-name>/src/ncsc-out/modules/yang \
# ../../<pkt-name>/src/yang

 

When I cut off the last part (as I saw in the above Discussion links) it worked fine.  

YANGPATH += ../../f5-bigip-gen-3.9/src/ncsc-out/modules/yang

Thanks for the great Knowledge Base. :-)

View solution in original post

1 REPLY 1
Highlighted
Beginner

Re: Leafref from service to device NED config using CDM and NSO 5.3.1.1

I tracked this down to a Makefile issue:

This fragment was based on the template in the Makefile:

 

YANGPATH += ../../f5-bigip-gen-3.9/src/ncsc-out/modules/yang \
../../f5-bigip-gen-3.9/src/yang

->

yang/loadbalancers.yang:185: error: the node 'ltm' from module 'tailf-ned-f5-bigip' (in node 'config' from 'tailf-ncs') is not found
make[1]: *** [../load-dir/slf-loadbalancers.fxs] Error 1

 

This pattern matched the template:

## Uncomment and patch the line below if you have a dependency to a NED
## or to other YANG files
# YANGPATH += ../../<ned-name>/src/ncsc-out/modules/yang \
# ../../<pkt-name>/src/yang

 

When I cut off the last part (as I saw in the above Discussion links) it worked fine.  

YANGPATH += ../../f5-bigip-gen-3.9/src/ncsc-out/modules/yang

Thanks for the great Knowledge Base. :-)

View solution in original post