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.
-
Click Add in the NE Types panel. The Select Property - CLI Script form opens.
-
Select one or more OmniSwitch NE types in the list and click OK. The Select Property - CLI Script form closes, and the NE types are listed on the CLI Script (Create) form.
|
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.
-
Import an existing text file with a CLI script. You can create a text file by copying and pasting the text from the sample OmniSwitch ping shown in
Figure 90-8, Sample OmniSwitch OAM ping script or the sample traceroute script shown in
Figure 90-9, Sample OmniSwitch traceroute script into a text editor. Perform the following steps:
-
Choose File→Import from the Editor menu. The Import dialog box appears.
-
Choose the file to be imported and click on Import. The script appears in the Script Editor workspace.
-
Modify the script as required.
-
Enter or copy and paste the CLI script text from the sample OmniSwitch ping shown in
Figure 90-8, Sample OmniSwitch OAM ping script or the sample traceroute script shown in Code
Figure 90-9, Sample OmniSwitch traceroute script into the Script Editor workspace.
Note: The following ping and traceroute scripts are sample CLI scripts that can be used to run ping and traceroute tests.
<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 |
<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.
Save the script to the Scripts tool.
-
Choose File→Save from the Editor menu or click Save. The Comment form opens.
- Configure the required parameters.
-
Click OK.
Export the script to a local or network text file.
-
Choose File→Export from the Editor menu, or click Export. A dialog box appears and prompts you to choose a file storage location in the network.
-
Scroll to the location in which you want to save the text file, and enter a filename in the appropriate field.
-
Click Export. The script version text file is saved in the specified location.
|
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 |