[junoscriptorium] New script: library/juniper/op/network/share-data

12 views
Skip to first unread message

Phil Shafer

unread,
Aug 13, 2009, 5:03:15 PM8/13/09
to junoscr...@googlegroups.com
library/juniper/op/network/share-data

phil.shafer has committed a new file to the junoscriptorium repository.
Please take a look, comment, and enjoy!

http://junoscriptorium.googlecode.com/svn/trunk/library/juniper/op/network/share-data.xml

/*
* This script maintains common config groups among a set of routers.
* Each group to be shared contains a list of targets to which the
* contents of the group a copied. The contents of this group on
* remote machines are completely replaced by the incoming data.
*
* The script detects which addresses are assigned to the local device
* and will skip such addresses, so the local device can be listed among
* the targets, allowing the config to be updated and shared from any
* device on the list.
*
* The share-data script can be invoked in two ways. With no
* arguments, the script looks for any group containing an
* apply-macro named "share-data". The contents of the macro are
* a list of targets to which the shared data should be copied.
*
* In addition, the share-data script can be invoked with a set of
* command line arguments to detail the exact data (by config group
* using the "group" parameter) and targets to which that data should
* be copied (using the "target" parameter with a space-separated
* list of targets).
*
* The "database" argument can tell the script to use the "candidate"
* configuration database, which allows uncommitted data to be shared.
* The default behavior is to use the committed configuration.
*
* "transform": Each target listed in the "share-data" macro can
* contain (as its value (in the name/value pairing)) the name of
* a func:function that can be called with the contents of the config
* group to be shared, and returns the data to be shipped to that
* target. This allows all manner of transformations to be implemented
* inside his framework.
*/


Enjoy,
The JUNOScriptorium Community (via add-file)

Reply all
Reply to author
Forward
0 new messages