To create an OmniSwitch ping or traceroute OAM diagnostic test using a CLI script
![]() | WARNING Network Damage |
Scripts that are not correctly created or applied can cause serious damage to the network.
Nokia recommends that system administrators clearly define user responsibilities for CLI script usage, and ensure that scripts are verified and validated before they are executed on devices in a live network.
Steps
Perform this procedure to create an OmniSwitch ping or traceroute OAM diagnostic test using a using the sample CLI scripts in Code Figure 90-8, Sample OmniSwitch OAM ping script and Code Figure 90-9, Sample OmniSwitch traceroute script .
1 |
Choose Tools→Scripts from the NFM-P main menu. The Scripts form opens. |
2 |
Choose CLI Script (Scripting) from the object drop-down menu and click Create. The CLI Script (Create) form opens. |
3 |
Configure the required parameters. Enable the Use Latest Version parameter to associate all of the targets of the script with the latest version of the CLI script. You must set the Content Type parameter to Velocity. |
4 |
Perform the following steps to specify the script target types.
|
5 |
Click Apply to apply the configuration. |
6 |
Click on the Versions tab. |
7 |
Create the script by clicking Create. The Script Editor script_name form opens. |
8 |
Create the CLI script text by performing one of the following steps.
Figure 90-8: Sample OmniSwitch OAM ping script<velocityProperties> <tab><name>General</name><tooltip>The general tab</tooltip> <group><name>General</name><tooltip>The general group</tooltip> <property> <name>ip_address</name> <uiName>IP Address:</uiName> <tooltip>IP address of the system to ping (IPv4 xxx.xxx.xxx.xxx)</tooltip> <type>String</type> <default>0.0.0.0</default> <uiOrder>1</uiOrder> <required>true</required> </property> <property> <name>count</name> <uiName>Count:</uiName> <tooltip>Number of frames to be transmitted</tooltip> <type>Integer</type> <default>6</default> <uiOrder>2</uiOrder> <required>true</required> </property> <property> <name>packed_size</name> <uiName>Packet Size:</uiName> <tooltip>Size of the data portion of the packet sent for this ping, in bytes</tooltip> <type>Integer</type> <default>64</default> <required>true</required> <uiOrder>3</uiOrder> <min>1</min> <max>60000</max> </property> <property> <name>interval</name> <uiName>Interval (seconds):</uiName> <tooltip>Polling interval</tooltip> <type>Integer</type> <uiOrder>4</uiOrder> <default>1</default> <min>1</min> <max>10000</max> </property> <property> <name>timeout</name> <uiName>Timeout (seconds):</uiName> <tooltip>Number of seconds the program will wait for a response before timing out</tooltip> <type>Integer</type> <uiOrder>5</uiOrder> <default>5</default> <min>1</min> <max>10000</max> </property> </group> </tab></velocityProperties> ping $ip_address count $count size $packed_size interval $interval timeout $timeout Figure 90-9: Sample OmniSwitch traceroute script<velocityProperties> <tab><name>General</name><tooltip>The general tab</tooltip> <group><name>General</name><tooltip>The general group</tooltip> <property> <name>ip_address</name> <uiName>IP Address:</uiName> <tooltip>IP address of the host whose route you want to trace. (IPv4 xxx.xxx.xxx.xxx)</tooltip> <type>String</type> <default>0.0.0.0</default> <uiOrder>1</uiOrder> <required>true</required> </property> <property> <name>maxHopValue</name> <uiName>Maximum Hop:</uiName> <tooltip>Maximum hop count for the trace</tooltip> <type>Integer</type> <default>5</default> <uiOrder>2</uiOrder> <required>true</required> </property> </group> </tab></velocityProperties> traceroute $ip_address max-hop $maxHopValue |
9 |
Perform one of the following.
|
10 |
Choose File→Close from the Editor menu. The Script Editor form closes, and the CLI Script (Edit) form reappears with the Version tab displayed. The new version of the script appears in the list. |
11 |
Close the forms. See To configure and run an OmniSwitch OAM diagnostic ping test CLI script and To configure and run an OmniSwitch OAM traceroute test CLI script for information about configuring and running OmniSwitch ping and traceroute OAM scripts. End of steps |