cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
413
Views
1
Helpful
3
Replies

resource-manager 3.1 id-pool leafref

ryan-hitch
Level 4
Level 4

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


3 Replies 3

ryan-hitch
Level 4
Level 4

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.

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?

Yes, please use the latest release, which as you say, combined ID and IP allocation in one package.