[j-nsp] Junos Space Configlet with Variables
Enoch Nyatoti
enyatoti at yahoo.com
Tue Feb 9 13:54:04 EST 2016
Hi Steve,
Many thanks. Will give it a try.
Best regards
Enoch Nyatoti
On Tuesday, February 9, 2016 6:51 PM, "Hodgkiss, Steve G" <Steve.Hodgkiss at chevron.com> wrote:
Hi - you need to become familiar with some velocity, xpath and variables to do what you want.
Assuming you want to source from a loopback0 address, then the base configlet you will need is something like:
#set($Loopback = $LOOPBACK_IP.replace("/32",""))
groups {
tacacs {
system {
tacplus-server <*> {
source-address $Loopback;
}
}
}
}
Loopback is an invisible text field which we're using as a variable for just the IP address rather than the ip and mask
LOOPBACK_IP is another variable with a defined xpath of /device/configuration/interfaces/interface[name="lo0"]/unit/family/inet/address/name/text()
Hope this gets you going.
Steve
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
More information about the juniper-nsp
mailing list