05-28-2019 11:38 AM
Hi Expert,
Can we add a PE router twice in a single service; as I think under list device is selected as key; so, it stopping...is there any procedure to add same device multiple time; as after adding router, configurations of each link are different from each other.
list link { tailf:info "Attachment Circuits"; key "device"; leaf device { tailf:info "PE Router"; mandatory true; type leafref { path "/ncs:devices/ncs:device/ncs:name"; } }
Regards,
BMork
05-28-2019 03:22 PM
So, it looks like you would like multiple links for the same device...
The list that you have specified - link - is keyed by the device so you will only be able to have 1 link per device key.
You could either have a list - say links - keyed by the device only which could have multiple link definitions within or, more likely if variable # links, the list is keyed by both the device _and_ a link identifier - say link-id..
list link { tailf:info "Attachment Circuits"; key "device link-id"; leaf device { tailf:info "PE Router"; mandatory true; type leafref { path "/ncs:devices/ncs:device/ncs:name"; }
}
link link-id {
type string; //or more restrictive type }
...
-Larry
06-12-2019 10:01 AM
Thanks Imanor, but is there any way to generate linkid automatically? managed by system without user input...
Regards,
Bmork
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