O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

IGP interface deletion

Interfaces within the IGP—be it ISIS or OSPF—often have rules or conventions regarding their manipulation. Formal out-of-service procedures might require operators to increase metrics before a shutdown or similar. What is unusual and unhelpful is the deletion or removal of an interface from the configuration, especially if it is currently participating in the IGP.

For this test, we make use of jcs:invoke() in order to make an RPC call to query the active interfaces within the protocols. We check the returned list to ensure that each interface is present in the configuration, and for each one that isn't, we emit an error message informing the user of the situation.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required