Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
Overview This script is for performance monitoring on the SRX
Overview An op-script to combine the output of two different EX operational commands and present it "your" way
In the case of developing an op-script, from an existing op-script you can call another op-script as below. Utility.slax is the other op-script enabled in the system. You can pass an argument ($arg) as the command-line argument to run the utility script, if required. 1 var $call -another-script-rpc := <op-script> ( 2 <script> "utility" ; 3 <arg> $arg ; 4 ) 5 var $rpc -result = jcs:invoke( $call -another-script-rpc); #ScriptingHow-To #How-To #Slax #opscript
In the case of developing an op-script, from an existing op-script you can call another op-script as below. Utility.slax is the other op-script enabled in the system. You can pass an argument ($arg) as the command-line argument to run the utility script, if required. 1 var $call-another-script-rpc := <op-script> ( 2 <script> "utility"; 3 <arg> $arg; 4 ) 5 var $rpc-result = jcs:invoke($call-another-script-rpc); #opscript #ScriptingHow-To #How-To #OPNFV
I want to discover OP Scripts arguments. If the arguments are declared in the configuration tree, this is very easy using these commands: 1 edit 2 show system scripts op file my script.slax arguments However, if the arguments are not declared there, how can I discover OP Script arguments?
Overview An example script uses the snmp.slax library
See matching posts in thread
- op script example
Overview Mimic the "ezsetup" script as an op script...Description This example script mimics the "ezsetup" script that ships on some low-end systems
Overview This topic describes how to commit Op scripts in private mode. Example Configuration This example shows how you commit an Op script in a private configuration session. var $connection = jcs:open(); var $edit-private = <open-configuration> ( <private>; ) /* adding the log message is optional, but considerate */ var $commit-config = <commit-configuration> ( <log> "Changed by script: " $script; ) var $configuration = <load-configuration> ( <configuration> ( /* stuff goes here */ ) /* please check/report on errors or warnings on each of $res1-4 */ var $res1 = jcs:execute( $connection, $edit-private ); /* open private session */ var $res2 = jcs:execute( $connection, $configuration ); /* load your config change */ var $res3 = jcs:execute( $connection, $commit-config ); /* commit your config */ var $res4 = jcs:execute( $connection, 'close-configuration' ); /* close up */ expr jcs:close( $connection ); /* may not be needed if script is exiting here */ ) #opscript #How-To #Slax #ScriptingHow-To
Description This script provides a safe version of the clear bgp neighbor command. That command allows an operator to accidently clear all BGP sessions if no peer is specified.This script requires "peer all" to be specified in order to clear all BGP peers,and it requires confirmation from the operator that they do indeed wish to clear all their BGP peers