12-04-2018 01:46 PM
Hi,
I'm working on a service that provisions prefix lists for customer services. The prefix-lists are of variable sizes and due to that, I want to know the number of entries in my (yang-) list when running my template.
In my template, the last entry will be treated differently than the previous and I need a hint how to do this. (In IOS-XR the every prefix-set entry is ended with a comma, except for the last one).
TIA.
/Johnny
12-04-2018 11:41 PM
12-04-2018 11:56 PM
Without testing it I would assume that the NED handles the comma part automatically? Sounds like something that the NED should be handling..
12-11-2018 12:05 AM
12-10-2018 11:59 PM - edited 12-11-2018 11:07 AM
Thanks, the count() function gave me the value I needed.
I did not try the position() function, but used a traditional counter variable in the loop.
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