Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

Re: Junoscript: Reserve Next Available Port

‎06-21-2010 08:25 AM

It looks to me like the interfaces will be sorted automatically in the configuration, so the lowest number ge interface should be the first ge interface you encounter in the configuration. Are you seeing otherwise?

1 REPLY 1
Junos Automation (Scripting)

Junoscript: Reserve Next Available Port

‎06-15-2010 04:24 AM

I'd like to write an op script that will find the lowest numbered ge interface that does not have a description, and apply a description to it.

 

ie,

 

op reserve description "To be used for foo"

 

which would set interfaces ge-0/0/0 description "To be used for foo" if 0/0/0 didn't have a description to begin with.

 

My primary challenge is knowing how to find the lowest interface that is lacking a description.   I'm writing for 9.3