Table Of Contents
Creating an Cisco ANA Macro Language Command: An Example
Creating a Command
Creating an Cisco ANA Macro Language Command: An Example
This chapter describes creating an Cisco ANA Macro Language command addvrf command from start to finish.
Creating a Command
This section describes how to create a Cisco ANA Macro Language command from beginning to end. The example used here describes how to create the addvrf command.
To create the addvrf command:
Step 1
Select the element that you want to configure this command for in the NetworkVision tree pane, context pane, or Inventory window.
Step 2
Right-click the element, then choose Management > Command Builder. The Command Builder wizard is displayed.
Step 3
Click New. The New Command dialog box is displayed.
Step 4
Define the command identification information:
•
Name—addvrf
•
Caption—Add VRF
•
Menu Visible—Selected
•
Menu Path—VRF Commands
•
Context IMO—Automatically displayed
•
Language—ANA Macro Language
•
Protocol—Telnet is selected by default
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
Using Table 15-1, enter the information for the parameters.
Table 15-1 addvrf Command 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 15-1).
Figure 15-1 User Input Arguments Dialog Box
Step 11
Click Next. The Script Lines dialog box is displayed, enabling you to add the script lines.
Step 12
Add the script lines, as shown in Figure 15-2.
Figure 15-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
Run the command:
•
Click Run Command in the toolbar.
•
Choose Tools > Run Command.
•
Right-click the command, then choose Run Command.
The input form is generated and displayed (Figure 15-3).
Figure 15-3 Input Form
Step 17
Enter values in the VRF Name, Route Distinguisher, and Route Target Both fields.
Step 18
Click Execute to view the results of the addvrf command as it is being executed.
Figure 15-4 Results of the Command
Step 19
Close the input form to return to the Command Builder wizard.