Table Of Contents
Creating an ANA Macro Language Command:
An Example
Creating a Command
Creating an ANA Macro Language Command:
An Example
This chapter describes creating an ANA Macro Language command addvrf command from start to finish.
Creating a Command
This section describes how to create an ANA Macro Language command from beginning to end. The example used here describes how to create the addvrf command.
To create the add vrf command:
Step 1
Shortcut on a managed element in the tree pane or context pane of the NetworkVision window.
or
Open the Inventory window for the required managed element and shortcut on the required network element.
Step 2
Select Management | Command Builder from the shortcut menu. The Command Builder wizard is displayed.
Step 3
Click New in the Command Builder wizard. The New Command dialog box is displayed.
Step 4
Define the command identification information, as follows:
•
Name—addvrf
•
Caption—Add VRF
•
Menu Visible—Selected
•
Menu Path—VRF Commands
•
Context IMO—Automatically displayed
•
Language—ANA Macro Language
•
Protocol—By default Telnet is selected
Step 5
Click Next. The Command Authorizations dialog box is displayed.
Step 6
Select the security access role Administrator.
Step 7
Click Next. The User Input Arguments dialog box is displayed.
Step 8
Click New. The Add/Edit User Argument for addvrf Command dialog box is displayed.
Step 9
Enter the following information for the parameters:
| |
Parameter 1
|
Parameter 2
|
Parameter 3
|
Name
|
vrfname
|
rd
|
rt
|
Caption
|
VRF Name
|
Route Distinguisher
|
Route Target Both
|
Type
|
String
|
String
|
String
|
Width
|
15
|
15
|
15
|
Visible
|
Select
|
Select
|
Select
|
Step 10
Click OK in the Add/Edit User Argument dialog box after each parameter. The new user-defined input parameters are displayed in the User Input Arguments dialog box.
Figure 3-1 User Input Arguments Dialog Box
Step 11
Click Next. The Script Lines dialog box is displayed enabling the user to add the script lines.
Step 12
Add the script lines, as shown in the example below.
Figure 3-2 Script Lines Example
Step 13
Click Finish. The Create Command dialog box is displayed. LEDs indicate the progress or status of the command as it is being saved to the registry.
Step 14
Click Close when the command is complete. The newly created addvrf command is displayed in the Command Builder table.
Step 15
Select the addvrf command in the Command Builder table.
Step 16
Click Run Command on the toolbar of the Command Builder wizard.
or
Select Run Command from the Tools menu or shortcut menu.
The input form is generated and displayed.
Figure 3-3 Input Form
Step 17
Enter values for the VRF Name, Route Distinguisher, and Route Target Both fields.
Step 18
Click Execute to view the actual results of the addvrf command that is being executed.
Figure 3-4 Results of the Command
Step 19
Close the input form and display the Command Builder wizard.