Templates
The Templates menu includes the following option:
Template Library
Template Library includes the following tabs:
Template Library
You can add, edit, or delete templates that are configured across different Cisco Nexus and Cisco MDS platforms using Cisco DCNM Web client. From Cisco DCNM Web client home page, choose Configure > Templates > Template Library > Templates. The following parameters are displayed for each template that is configured on Cisco DCNM Web client. Templates support JavaScript. You can use the JavaScript function in a template to perform arithmetic operations and string manipulations in the template syntax.
The following table describes the fields that appear on this page.
Field |
Description |
---|---|
Add Template |
Allows you to add a new template. |
Launch job creation wizard |
Allows you to create jobs. |
Modify/View Template |
Allows you to view the template definition and modify as required. |
Save Template As |
Allows you to save the selected template in a different name. You can edit the template as required. |
Delete Template |
Allows you to delete a template |
Import Template |
Allows you to import a template from your local directory, one at a time. |
Export template |
Allows you to export the template configuration to a local directory location. |
Import Template Zip File |
Allows you to import .zip file, that contains more than one template that is bundled in a .zip format All the templates in the ZIP file are extracted and listed in the table as individual templates. |
Note |
Notifications appear next to Import Template Zip File if there are issues while loading templates after restarting the server. Click the notifications to see the errors in the Issues in loading Template window. Templates with errors are not listed in the Templates window. To import these templates, correct the errors, and import them. |
Field |
Description |
||
---|---|---|---|
Template Name |
Displays the name of the configured template. |
||
Template Description |
Displays the description that is provided while configuring templates. |
||
Tags |
Displays the tag that is assigned for the template and aids to filter templates based on the tags. |
||
Supported Platforms |
Displays the supported Cisco Nexus platforms compatible with the template. Check the check box of platforms that are supported with the template.
|
||
Template Type |
Displays the type of the template. |
||
Template Sub Type |
Specifies the sub type that is associated with the template. |
||
Template Content Type |
Specifies if it is Jython or Template CLI. |
Field |
Description |
---|---|
Implements |
Displays the abstract template to be implemented. |
Dependencies |
Specifies the specific feature of a switch. |
Published |
Specifies if the template is published or not. |
Imports |
Specifies the base template for importing. |
In addition, from the menu bar, choose Configure > Templates > Template Library > Templates and you can also:
-
Click Show Filter to filter the templates that is based on the headers.
-
Click Print to print the list of templates.
-
Click Export to Excel to export the list of template to a Microsoft Excel spreadsheet.
This section contains the following:
Template Structure
The configuration template content mainly consists of four parts. Click the Help icon next to the Template Content for information about editing the content of the template.
This section contains the following:
Template Format
This section describes the basic information of the template. The possible fields are as detailed in the table below.
Property Name |
Description |
Valid Values |
Optional? |
---|---|---|---|
name |
The name of the template |
Text |
No |
description |
Brief description about the template |
Text |
Yes |
userDefined |
Indicates whether the user created the template. Value is ‘true’ if user created. |
“true” or “false” |
Yes |
supportedPlatforms |
List of device platforms supports this configuration template. Specify ‘All’ to support all platforms. |
N1K, N3K, N3500, N4K, N5K, N5500, N5600, N6K, N7K, N9K, MDS, VDC, N9K-9000v, IOS-XE, IOS-XR, Others, All Nexus Switches list separated by comma. |
No |
templateType |
Specifies the type of Template used. |
|
Yes |
templateSubType |
Specifies the sub type associated with the template. |
|
|
contentType |
|
Yes |
|
implements |
Used to implement the abstract template. |
Text |
Yes |
dependencies |
Used to select the specific feature of a switch. |
Text |
Yes |
published |
Used to Mark the template as read only and avoids changes to it. |
“true” or “false” |
Yes |
Template Variables
This section contains declared variables, the data type, default values, and valid values conditions for the parameters that are used in the template. These declared variables are used for value substitution in the template content section during the dynamic command generation process. Also these variables are used in decision making and in iteration blocks in the template content section. Variables have predefined data types. You can also add a description about the variable. The following table describes the syntax and usage for the available datatypes.
Variable Type |
Valid Value |
Iterative? |
||
---|---|---|---|---|
boolean |
true|false |
No |
||
enum |
|
No |
||
float |
Floating number format |
No |
||
floatRange |
|
Yes |
||
Integer |
Any number |
No |
||
integerRange |
Contiguous numbers separated by “-“ Discrete numbers separated by “,”
|
Yes |
||
interface |
Format: <if type><slot>[/<sub slot>]/<port>
|
No |
||
interfaceRange |
|
Yes |
||
ipAddress |
IPv4 OR IPv6 address |
No |
||
ipAddressList |
You can have a list of IPv4, IPv6, or a combination of both types of addresses.
|
Yes |
||
ipAddressWithoutPrefix |
or
|
No |
||
ipV4Address |
IPv4 address |
No |
||
ipV4AddressWithSubnet |
|
No |
||
ipV6Address |
IPv6 address |
No |
||
ipV6AddressWithPrefix |
|
No |
||
ipV6AddressWithSubnet |
IPv6 Address with Subnet |
No |
||
ISISNetAddress |
|
No |
||
long |
|
No |
||
macAddress |
14 or 17 character length MAC address format |
No |
||
string |
Free text, for example, used for the description of a variable
|
No |
||
string[] |
|
Yes |
||
struct |
Set of parameters that are bundled under a single variable.
|
No
|
||
wwn (Available only in Cisco DCNM Web Client) |
|
No |
Example: Template Variables
##template variables
integer VSAN_ID;
string SLOT_NUMBER;
integerRange PORT_RANGE;
integer VFC_PREFIX;
##
Variable Meta Property
Each variable that is defined in the template variable section has a set of meta properties. The meta properties are mainly the validation rules that are defined for the variable.
The following table describes the various meta properties applicable for the available variable types.
Variable Type |
Description |
Variable Meta Property |
|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
default Value |
valid Values |
decimal Length |
min |
max |
min Slot |
max Slot |
min Port |
max Port |
min Length |
max Length |
regular Expr |
||||
boolean |
A boolean value.
|
Yes |
|||||||||||||
enum |
Yes |
||||||||||||||
float |
signed real number.
|
Yes |
Yes |
Yes |
Yes |
Yes |
|||||||||
floatRange |
range of signed real numbers
|
Yes |
Yes |
Yes |
Yes |
Yes |
|||||||||
integer |
signed number
|
Yes |
Yes |
Yes |
Yes |
||||||||||
integerRange |
Range of signed numbers
|
Yes |
Yes |
Yes |
Yes |
||||||||||
interface |
specifies interface/port
|
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
||||||||
interfaceRange |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
|||||||||
ipAddress |
IP address in IPv4 or IPv6 format |
Yes |
|||||||||||||
ipAddressList |
You can have a list of IPv4, IPv6, or a combination of both types of addresses.
|
Yes |
|||||||||||||
ipAddressWithoutPrefix |
IPv4 or IPv6 Address (does not require prefix/subnet). |
||||||||||||||
ipV4Address |
IPv4 address |
Yes |
|||||||||||||
ipV4AddressWithSubnet |
IPv4 Address with Subnet |
Yes |
|||||||||||||
ipV6Address |
IPv6 address |
Yes |
|||||||||||||
ipV6AddressWithPrefix |
IPv6 Address with prefix |
Yes |
|||||||||||||
ipV6AddressWithSubnet |
IPv6 Address with Subnet |
Yes |
|||||||||||||
ISISNetAddress |
|
||||||||||||||
long |
|
Yes |
Yes |
Yes |
|||||||||||
macAddress |
MAC address |
||||||||||||||
string |
literal string
|
Yes |
Yes |
Yes |
Yes |
||||||||||
string[] |
string literals that are separated by a comma (,)
|
Yes |
|||||||||||||
struct |
Set of parameters that are bundled under a single variable.
|
||||||||||||||
wwn |
WWN address |
Example: Meta Property Usage
##template variables
integer VLAN_ID {
min = 100;
max= 200;
};
string USER_NAME {
defaultValue = admin123;
minLength = 5;
};
struct interface_a{
string inf_name;
string inf_description;
ipAddress inf_host;
enum duplex {
validValues = auto, full, half;
};
}myInterface;
##
Variable Annotation
You can configure the variable properties marking the variables using annotations.
Note |
Variable Annotations are available for POAP only. However, the annotations do not impact on the template type ‘CLI’. |
The following annotations can be used in the template variable section.
Annotation Key |
Valid Values |
Description |
||
---|---|---|---|---|
AutoPopulate |
Text |
Copies values from one field to another |
||
DataDepend |
Text |
|||
Description |
Text |
Description of the field appearing in the window |
||
DisplayName |
Text
|
Display name of the field appearing in the window |
||
Enum |
Text1, Text2, Text3, and so on |
Lists the text or numeric values to select from |
||
IsAlphaNumeric |
“true” or “false” |
Validates if the string is alphanumeric |
||
IsAsn |
“true” or “false” |
|||
IsDestinationDevice |
“true” or “false” |
|||
IsDestinationFabric |
“true” or “false” |
|||
IsDestinationInterface |
“true” or “false” |
|||
IsDestinationSwitchName |
“true” or “false” |
|||
IsDeviceID |
“true” or “false” |
|||
IsDot1qId |
“true” or “false” |
|||
IsFEXID |
“true” or “false” |
|||
IsGateway |
“true” or “false” |
Validates if the IP address is a gateway |
||
IsInternal |
“true” or “false” |
Makes the fields internal and does not display them on the window
|
||
IsManagementIP |
“true” or “false”
|
|||
IsMandatory |
“true” or “false” |
Validates if a value should be passed to the field mandatorily |
||
IsMTU |
“true” or “false” |
|||
IsMultiCastGroupAddress |
“true” or “false” |
|||
IsMultiLineString |
“true” or “false” |
Converts a string field to multiline string text area |
||
IsMultiplicity |
“true” or “false” |
|||
IsPassword |
“true” or “false” |
|||
IsPositive |
“true” or “false” |
Checks if the value is positive |
||
IsReplicationMode |
“true” or “false” |
|||
IsShow |
“true” or “false” |
Displays or hides a field on the window |
||
IsSiteId |
“true” or “false” |
|||
IsSourceDevice |
“true” or “false” |
|||
IsSourceFabric |
“true” or “false” |
|||
IsSourceInterface |
“true” or “false” |
|||
IsSourceSwitchName |
“true” or “false” |
|||
IsSwitchName |
“true” or “false” |
|||
IsRMID |
“true” or “false” |
|||
IsVPCDomainID |
“true” or “false” |
|||
IsVPCID |
“true” or “false” |
|||
IsVPCPeerLinkPort |
“true” or “false” |
|||
IsVPCPeerLinkPortChannel |
“true” or “false” |
|||
IsVPCPortChannel |
“true” or “false” |
|||
Password |
Text |
Validates the password field |
||
UsePool |
“true” or “false” |
|||
UseDNSReverseLookup |
||||
Username |
Text |
Displays the username field on the window |
||
Warning |
Text |
Provides text to override the Description annotation |
Example: AutoPopulate Annotation
##template variables
string BGP_AS;
@(AutoPopulate="BGP_AS")
string SITE_ID;
##
Example: DisplayName Annotation
##template variables
@(DisplayName="Host Name", Description = "Description of the host")
String hostname;
@(DisplayName="Host Address", Description = " test description" IsManagementIP=true)
ipAddress hostAddress;
##
Example: IsMandatory Annotation
##template variables
@(IsMandatory="ipv6!=null")
ipV4Address ipv4;
@(IsMandatory="ipv4!=null")
ipV6Address ipv6;
##
Example: IsMultiLineString Annotation
##template variables
@(IsMultiLineString=true)
string EXTRA_CONF_SPINE;
##
IsShow Annotation
##template variables
boolean isVlan;
@(IsShow="isVlan==true")
integer vlanNo;
##
##template variables
boolean enableScheduledBackup;
@(IsShow="enableScheduledBackup==true",Description="Server time")
string scheduledTime;
##
The condition "enableScheduledBackup==true" evaluates to true/false
##template variables
@(Enum="Manual,Back2BackOnly,ToExternalOnly,Both")
string VRF_LITE_AUTOCONFIG;
@(IsShow="VRF_LITE_AUTOCONFIG!=Manual", Description="Target Mask")
integer DCI_SUBNET_TARGET_MASK
##
The condition "VRF_LITE_AUTOCONFIG!=Manual" matches string comparison to evaluate to true or false
Example: Warning Annotation
##template variables
@(Warning="This is a warning msg")
string SITE_ID;
##
Templates Content
This section includes the configuration commands and any parameters that you want to include in the template. These commands can include the variables declared in the template variables section. During the command generation process the variable values are substituted appropriately in the template content.
Note |
You must specify the commands that you include as if you were entering them in the global configuration command mode on any device. You must consider the command mode when you include commands. |
Template content is governed by the usage of variables.
-
Scalar variables: does not take a range or array of values which cannot be used for iteration (In the variable types table those marked iterate-able as 'No'). Scalar variables must be defined inside the template content.
Syntax: $$<variable name>$$ Example: $$USER_NAME$$
-
Iterative variables: used for block iteration. These loop variable must be accessed as shown below inside the iteration block.
Syntax:@<loop variable> Example: foreach val in $$INTEGER_RANGE_VALUE$$ { @val }
-
Scalar Structure Variable: Structure member variables can be accessed inside the template content.
Syntax: $$<structure instance name>.<member variable name>$$ Example: $$myInterface.inf_name$$
-
Array Structure Variable: Structure member variables can be accessed inside the template content.
Syntax: $$<structure instance name>.<member variable name>$$ Example: $$myInterface.inf_name$$
In addition to the template variables, you can use the conditional and iterative command generation using the following statements:
-
if-else if-else Statement: makes a logical decision in inclusion/exclusion of set of configuration command based on the value assigned for the variable in it.
Syntax: if(<operand 1> <logical operator> <operand 2>){ command1 .. command2.. .. } else if (<operand 3> <logical operator> <operand 4> ) { Command3 .. Command4.. .. } else { Command5 .. Command6.. .. } Example: if-else if-else statement if($$USER_NAME$$ == 'admin'){ Interface2/10 no shut } else { Interface2/10 shut }
-
foreach Statement: used for iterating a block of commands. The iteration is performed based on the assigned loop variable value.
Syntax: foreach <loop index variable> in $$<loop variable>$$ { @<loop index variable> .. } Example: foreach Statement foreach ports in $$MY_INF_RANGE$${ interface @ports no shut }
-
Optional parameters: By default all parameters are mandatory. To make a parameter optional, you must annotate the parameter.
-
Interactive command handling: Include prompt and response as part of the template content for handling interactive commands.
Example: ##template variables string srcFile; string srcDir; string password; string vrf; ## ##template content copy scp://root@10.127.117.65/$$srcFile$$ bootflash: vrf $$vrf$$ <prompt:'(yes/no)?', response:'yes'> <prompt:'(y/n)?[n]', response:'y'> <prompt:'password:', response:'$$password$$'>
In the variable section, you can include the following command:
-
@(IsMandatory=false)
-
Integer frequency;
In the template content section, a command can be excluded or included without using “if” condition check, by assigning a value to the parameter. The optional command can be framed as below:
-
probe icmp [frequency frequency-value] [timeout seconds] [retry-count retry-count-value]
Template Content Editor
The template content editor has the following features:
-
Syntax highlighting: The editor highlights the syntax, like different types of statements, keywords, and so on, for Python scripting.
-
Autocompletion: The editor suggests the template datatypes, annotations, or metaproperties when you start typing.
-
Go to line: You can navigate to the exact line in the template content editor instead of scrolling. Press Command-L in Mac or Ctrl-L in Windows, and enter the line number to which you want to navigate to in the pop-up window.
If you enter a value greater than the number of lines in the editor, you will be navigated to the last line in the editor window.
-
Template search and replace: Press Command-F in Mac or Ctrl-F in Windows, enter the search term in the Search for field, and select the type of search in the search window. You can perform the following searches in the editor:
-
RegExp Search: You can perform the regular expression search in the editor.
-
CaseSensitive Search: You can perform a case-sensitive search in the editor.
-
Whole Word Search: You can perform a whole word search to find the exact words in the editor. For example, a regular search for the word "play" returns results where it is part of words like "display," but the whole word search returns results only when there is an exact match for the word "play".
-
Search In Selection: You can perform a search in the selected content. Select the content to which you want to limit the search and enter the search term.
Choose the + icon in the search window to use the replace option. Enter the replacing word in the Replace with field. You can replace the selected word once by selecting Replace. To replace all the occurrences of the selected word, select All.
-
-
Code folding: You can expand or group code blocks in the editor by clicking the arrow next to their line numbers.
-
Other features: The editor automatically indents the code, the closing braces, and highlights the matching parenthesis.
Template Editor Settings
You can edit the following features of a template editor by clicking Template Editor Settings.
-
Theme: Select the required theme for the editor from the drop-down list.
-
KeyBinding: Select the editor mode from the KeyBinding drop-down list to customize the editor. Vim and Ace modes are supported. The default is Ace.
-
Font Size: Select the required font size for the editor.
Advanced Features
The following are the advanced features available to configure templates.
-
Assignment Operation
Config template supports assignment of variable values inside the template content section. The values are validated for the declared data type of the variable. If there is a mismatch, the value is not assigned.
Assignment operation can be used under the following guidelines:
-
The operator on the left must be any of the template parameters or a for loop parameter.
-
The operator on the right values can be any of the values from template parameters, for loop parameters, literal string values surrounded by quotes or simple string values.
If a statement does not follow these guidelines, or if it does not suit this format, it will not be considered as assignment operation. It is substituted during command generation like other normal lines. Example: Template with assignment operation ##template properties name =vlan creation; userDefined= true; supportedPlatforms = All; templateType = CLI; published = false; ## ##template variables integerRange vlan_range; @(internal=true) integer vlanName; ## ##template content foreach vlanID in $$vlan_range$${ vlan @vlanID $$vlanName$$=@vlanID name myvlan$$vlanName$$ } ##
-
-
Evaluate methods
Config template uses the Java runtime provided Java script environment to perform arithmetic operations (such as ADD, SUBTRACT, and so on), string manipulations, and so on.
Locate the JavaScript file in the template repository path. This file contains primary set of arithmetic, string functions. You can also add custom JavaScript methods.
These methods can be called from config template content section in below format: Example1: $$somevar$$ = evalscript(add, "100", $$anothervar$$)
Also the evalscript can be called inside if conditions as below: if($$range$$ > evalscript(sum, $$vlan_id$$, -10)){ do something... }
You can call a method that is located at the backend of the Java script file.
-
Dynamic decision
Config template provides a special internal variable “LAST_CMD_RESPONSE”. This variable stores the last command response from the device during the execution of the command. This can be used in the config template content to make dynamic decisions to deliver the commands that are based on the device condition.
Note
The if block must be followed by an else block in a new line, which can be empty.
An example use case to create a VLAN, if it is does not exist on the device. Example: Create VLAN ##template content show vlan id $$vlan_id$$ if($$LAST_CMD_RESPONSE$$ contains "not found"){ vlan $$vlan_id$$ } else{ } ##
This special implicit variable can be used only in the “IF” blocks.
-
Template referencing
You can have a base template with all the variables defined. This base template can be imported to multiple templates. The base template content is substituted in the appropriate place of the extending template. The imported template parameters and the contents can be accessed inside the extending template.
Example: Template Referencing Base template: ##template properties name =a vlan base; userDefined= true; supportedPlatforms = All; templateType = CLI; published = false; timestamp = 2015-07-14 16:07:52; imports = ; ## ##template variables integer vlan_id; ## ##template content vlan $$vlan_id$$ ## Derived Template: ##template properties name =a vlan extended; userDefined= true; supportedPlatforms = All; templateType = CLI; published = false; timestamp = 2015-07-14 16:07:52; imports = a vlan base,template2; ## ##template variables interface vlanInterface; ## ##template content <substitute a vlan base> interface $$vlanInterface$$ <substitute a vlan base> ##
When you launch the extended template, the parameter inputs for the base template are also obtained. In addition, the substituted content is used for complete CLI command generation.
-
Solution POAP Templates for VXLAN and FabricPath
From Cisco DCNM Release 10.0(1), Cisco provides you a set of defined templates to aid in POAP operations. You can download Cisco-defined templates from https://software.cisco.com/download/release.html.
For instructions on how to download and install POAP templates, see Cisco DCNM Installation Guide, Release 10.0(x).
Adding a Template
To add user-defined templates and schedule jobs from the Cisco DCNM Web UI, perform the following steps:
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates. The Templates window is displayed with the name of the template along with its description, supported platforms, and tags. |
||
Step 2 |
Click Add to add a new template. The Template Properties window appears. |
||
Step 3 |
Specify a template name, description, tags, and supported platforms for the new template. |
||
Step 4 |
Specify a Template Type for the template. Select POAP to make this template available when you power on the application.
|
||
Step 5 |
Select a Template Sub Type and Template Content Type for the template. |
||
Step 6 |
Click the Advanced tab to edit other properties like Implements, Dependencies, Published, and Imports. Select Published to make the template read-only. You cannot edit a published template. |
||
Step 7 |
From the Imports > Template Name list, check the template check box. The base template content is displayed in the Template Content window. The base template displays the template properties, template variables, and template content. This template can be imported in to another template and the base template content is substituted in the appropriate place of the extending template. When you launch the extended template, the parameter inputs for the base template are also obtained. Also, the substituted content is used for complete CLI command generation.
|
||
Step 8 |
Click OK to save the template properties, or click the cancel icon at the top-right corner of the window to revert the changes.
|
||
Step 9 |
Click Template Content to edit the template syntax. For information about the structure of the Configuration Template, see the Template Structure section. |
||
Step 10 |
Click Validate Template Syntax to validate the template values. If an error or a warning message appears, you can check the validation details in Validation Table by clicking the error and warnings field.
|
||
Step 11 |
Click Save to save the template. |
||
Step 12 |
Click Save and Exit to save the configuration and go back to the configuring templates screen. |
Configuring Template Job
To configure and schedule jobs for individual templates from the Cisco DCNM Web UI, perform the following steps:
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates. |
||
Step 2 |
Select a template.
|
||
Step 3 |
Click Launch job creation wizard icon and click Next. |
||
Step 4 |
Use the drop-down to select Device Scope. The devices that are configured under the selected Device Scope are displayed.
|
||
Step 5 |
Use the arrows to move the devices to the right column for job creation and click Next. |
||
Step 6 |
In the Define Variable section, specify the VSAN_ID, VLAN_ID, ETH_SLOT_NUMBER, VFC_SLOT_NUMBER, SWITCH_PORT_MODE, ETH_PORT_RANGE and ALLOWED_VLANS values.
|
||
Step 7 |
In the Edit Variable Per Device section, double click the fields to edit the variables for specific devices and click Next. |
||
Step 8 |
If you have selected multiple devices, use the drop-down to select a specific device and preview its configuration. Click Back to edit the configuration or click Next. |
||
Step 9 |
Specify a job name and description. The Device Credentials are populated from Administration > Credentials Management > LAN Credentials. |
||
Step 10 |
Use the radio button to select Instant Job or Schedule Job. If you select Schedule Job, specify the date and time for the job delivery. |
||
Step 11 |
Use the check box to select Copy Run to Start. |
||
Step 12 |
If you want to configure more transaction and delivery options, use the check box to select Show more options. |
||
Step 13 |
Under Transaction Options(Optional), if you have a device with rollback feature support, select Enable Rollback check box and select the appropriate radio button. You can choose one of the following options by selecting the appropriate radio button:
|
||
Step 14 |
Under Delivery Options (Optional), specify the command response timeout in seconds and use the radio button to select a delivery order. The value of command response timeout ranges from 1 to 180. You can choose one of the following options by selecting the appropriate radio button:
|
||
Step 15 |
Click Finish to create the job. A confirmation message is displayed that the job has been successfully created. The jobs are listed in the Jobs window. |
Modifying a Template
You can edit the user-defined templates. However, the predefined templates and templates that are already published cannot be edited.
Procedure
Step 1 |
From Configure > Templates > Template Library > Templates, select a template. |
Step 2 |
Click Modify/View template. |
Step 3 |
Edit the template description and tags. The edited template content is displayed in a pane on the right. |
Step 4 |
From the Imports > Template Name list, check the template check box. The base template content is displayed in the Template Content window. You can edit the template content based on your requirement in the Template Content window. Click the help icon next to the Template Content window for information about editing the content of the template. |
Step 5 |
Edit the supported platforms for the template. |
Step 6 |
Click Validate Template Syntax to validate the template values. |
Step 7 |
Click Save to save the template. |
Step 8 |
Click Save and Exit to save the configuration and go back to the configuring templates screen. |
Copying a Template
To copy a template from the Cisco DCNM Web UI, perform the following steps:
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates, and select a template. |
Step 2 |
Click Save Template As. |
Step 3 |
Edit the template name, description, tags, and other parameters. The edited template content is displayed in the right-hand pane. |
Step 4 |
From the Imports > Template Name list, check the template check box. The base template content is displayed in the Template Content window. You can edit the template content that is based on your requirement in the Template Content window. Click the help icon next to the Template Content window for information about editing the content of the template. |
Step 5 |
Edit the supported platforms for the template. |
Step 6 |
Click Validate Template Syntax to validate the template values. |
Step 7 |
Click Save to save the template. |
Step 8 |
Click Save and Exit to save the configuration and go back to the configuring templates screen. |
Deleting a Template
You can delete the user-defined templates. However, you cannot delete the predefined templates. From Cisco DCNM Release 11.0(1), you can delete multiple templates at once.
To delete a template from the Cisco DCNM Web UI, perform the following steps:
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates. |
Step 2 |
Use the check box to select a template and click Remove template icon. The template is deleted without any warning message. |
What to do next
The template is deleted from the list of templates on the DCNM Web UI. When you restart the DCNM services, the deleted templates are displayed on the Configure > Templates > Template Library > Templates page.
To delete the template permanently, delete the template that is located in your local directory: Cisco Systems\dcm\dcnm\data\templates\.
Importing a Template
To import a template from the Cisco DCNM Web UI, perform the following steps:
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates and click Import Template. |
||
Step 2 |
Browse and select the template that is saved on your computer.
|
||
Step 3 |
Click Validate Template Syntax to validate the template. |
||
Step 4 |
Click Save to save the template or Save and Exit to save the template and exit.
|
Exporting a Template
Procedure
Step 1 |
Choose Configure > Templates > Template Library > Templates. |
Step 2 |
Use the check box to select a template and click Export Template. The browser requests you to open or save the template to your directory. |
Installing POAP Templates
Cisco DCNM allows you to add, edit, or delete user-defined templates that are configured across different Cisco Nexus platforms. From Cisco DCNM Release 10.0(x), Cisco-defined FabricPath and IP VXLAN Programmable Fabric POAP Templates are provided as a separate download on the official Cisco website. These templates are compatible for use with the DCNM Virtual Appliance (OVA or ISO) for use with Nexus 2000, Nexus 5000, Nexus 6000, Nexus 7000, and Nexus 9000 Series switches.
You can download the Cisco-defined templates from https://software.cisco.com/download/release.html.
Perform the following task to install the POAP templates from the Cisco DCNM.
Procedure
Step 1 |
Navigate to https://software.cisco.com/download/release.html, and download the file. You can choose one of the following:
|
Step 2 |
Unzip and extract the files to the local directory on your computer. |
Step 3 |
Choose Configure > Templates > Template Library > Templates. |
Step 4 |
Click Import Template. |
Step 5 |
Browse and select the template that is saved on your computer. You can edit the template parameters, if necessary. |
Step 6 |
Check POAP and Publish check box to designate these templates as POAP templates. |
Step 7 |
Click Validate Template Syntax to validate the template. |
Step 8 |
Click Save to save the template or Save and Exit to save the template and exit. |
Configuring Jobs
Procedure
Step 1 |
Choose Configure > Templates > Templates Library > Jobs. The jobs are listed along with the Job ID, description and status. The latest task will be listed at the top.
|
||
Step 2 |
Click Show Filter to filter the list. In the Status column, use the drop-down to select the job status. |
||
Step 3 |
Select a job and click the Delete icon to delete the job. |
||
Step 4 |
To view the status of a job, click the Job ID radio button and click Status. |
||
Step 5 |
To view the command execution status for a device, click the radio button of a device name from the Devices table in the Job Execution Status window.
|