I spent some time today trying a couple approaches to this, but they all seemed a little klunky.
I'm looking for the best way to change the BGP prefixes which are advertised out to an ISP, based on some check. I want to set a timeout so the router won't attempt to send the route again for say 30 minutes after it is triggered, but then will start advertising it again, and monitor to see if the trigger condition returns. If the trigger condition returns then again withdrawl the route for 30 minutes and so on.
I'm using a prefix-list already to limit outbound route advertisments, so it seems simplest to just make a config change to remove one line in the prefix-list, then a few minutes later put it back.
I tried just using the "cli command wait", but if I set the wait period too long, the applet seemed to die, and never ran the later cli commands to put the prefix-list line back. There is also a exit-time clause for the event, but I couldn't figure out how to put the line back after the exit-time expired. Lastly I tried doing an event with a watchdog timer, but also couldn't get that to work either. Before I spend too much time working on differant options, I wanted to see if anyone had any recommendations.
I've done some TCL scripting on Cisco routers, but that seemed to be overkill for this, and I wanted to keep the config easy to manage for peers who might not be as proficient in TCL scripting.
This is intended for ASR-1002X routers if it matters.
Any suggestions would be much appreciated.