Search

1 to 10 of 52
Sort by

Blog Entry
Scripting How-To: ex-interface script

Overview An op-script to combine the output of two different EX operational commands and present it "your" way


Blog Entry
Scripting How-To: Call another op-script within an op-script

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


Blog Entry
Scripting How-To Call another op-script within an op-script

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


Blog Entry
Scripting How-To: Discovering op script arguments

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?



Discussion Thread 5
op script example

Focus Search - op script example......RE: op script example


Blog Entry
Scripting How-To: Set up an op script that works like an "ezsetup" script

Overview Mimic the "ezsetup" script as an op script...Description This example script mimics the "ezsetup" script that ships on some low-end systems


Blog Entry
Scripting How-To: Commit Op scripts in private mode

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


Blog Entry
Scripting How-To: clear-bgp-neighbor script requires confirmation

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