11-15-2017 09:39 AM - edited 03-01-2019 04:02 AM
I am trying to build a leafref to the list of resource-manager id-pools.
I have the resource-manager 3.1 package loaded, but am confused about how to import and reference an id-pool name from this package as its layout is more complex than the examples (such as virtual-mpls-vpn where id-allocator is a standalone package).
I know that I need something like the following, but its a bit more complicated since id-allocator is a component of the resource-manager package. How can I import the id-allocator component of resource-manager and reference the resource-pool name? Thanks!
import resource-manager {
prefix rman;
}
leaf vlan-pool {
type leafref {
path "/rman:resource-pools:/rman:id-pool/rman:name";
}
}
show configuration resource-pools | display xpath
/resource-pools/idalloc:id-pool[name='VLAN-SITE1_RP']/range/start 100
/resource-pools/idalloc:id-pool[name='VLAN-SITE1_RP']/range/end 999
/resource-pools/idalloc:id-pool[name='VLAN-SITE2_RP']/range/start 100
/resource-pools/idalloc:id-pool[name='VLAN-SITE2_RP']/range/end 999
/resource-pools/idalloc:id-pool[name='VLAN-SITE3_RP']/range/start 100
/resource-pools/idalloc:id-pool[name='VLAN-SITE3_RP']/range/end 999
11-15-2017 10:14 AM
I think I have it figured out. I was using the resource-manager project and importing the whole project rather than the individual packages (fooled by the superior version numbers). I just setup the id-allocator 1.3 and resource-manager 1.3 packages and problem solved.
11-15-2017 10:54 AM
Went back to the resource-manager project. Had forgotten to update the YANGPATH in my package's Makefile. All is well now. Argh. I assume that the consolidated resource-manager project is the latest (and preferred) way forward since it is the latest release?
11-16-2017 03:47 PM
Yes, please use the latest release, which as you say, combined ID and IP allocation in one package.
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