0

my CLI looks like -

router config
site site123
   eid-prefix instance-id 100 1.1.1.0/24 accept-more-specifics 
   eid-prefix instance-id 102 2.2.2.0/24 accept-more-specifics 
   eid-prefix instance-id 103 3.3.3.0/24 accept-more-specifics 
site site345
   eid-prefix instance-id 104 4.4.1.0/24 accept-more-specifics 
   eid-prefix instance-id 106 6.6.2.0/24 accept-more-specifics 
extranet ext1
   eid-record-provider instance-id 103

I need a must statement for CLI "eid-record-provider" which validates if the instance-id being used there is defined under "site".

I have written something like -

 tailf:cli-diff-dependency "../../../../site/eid-prefix/instance-id/id";
 must "../../../../site[name = current()]/eid-prefix/instance-id[id = current() ]" {
   error-message "% Please configure site before provider instance";   
 }

I am not sure how i am going to iterate must for all sites, as "site" is a list.

Thanks

user1060517
  • 355
  • 1
  • 5
  • 17

1 Answers1

0

No need to iterate on all leaves; you may constrain the must at the level of eid-prefix: if it is a leaf, read Section 7.6.2.

Community
  • 1
  • 1
Ariel Otilibili
  • 260
  • 1
  • 6