[j-nsp] Junos Space Configlet with Variables

Hodgkiss, Steve G Steve.Hodgkiss at chevron.com
Tue Feb 9 11:51:09 EST 2016


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


More information about the juniper-nsp mailing list