Create Templates To Automate Device Configuration Changes

This chapter has the following topics.

Why Create New Configuration Templates?

Cisco EPN Manager provides a number of out-of-the-box configuration templates that you can use to make changes on your network devices. Those are described in Create a New CLI Configuration Template Using An Existing Template.

If you have sufficient privileges, you can also create new templates that meet the exact needs of your environment, and then make those templates available for others to use. You can make the templates as simple or as complex as needed, including grouping multiple templates together into a composite template. Finally, you can associate templates with particular devices by creating configuration groups.

Cisco EPN Manager provides out-of-the-box CLI commands that you can use in your templates. It also provides a blank CLI template you can use to create new CLI commands. You can use them singly or with other commands in a composite template.

How you use configuration templates can depend on factors such as how large your network is, the number of designers in your organization, and how much variation there is among devices configuration. For example:

  • For a small network with only one or two designers and a limited number of device configurations, start by copying the CLI configurations you know are “good” into a set of templates. You could then combine them into composite templates and make them available to your operators.
  • For a large network with many different device configurations, try to identify the configurations you can standardize. This lets you control the amount of exceptions to these standards, and lets you turn features on and off as needed.

Ways to Create Configuration Templates Using Cisco EPN Manager

Cisco EPN Manager provides different methods for creating new configuration templates, depending on your user account privileges. CLI configuration templates contain one or more CLI configuration commands (the same commands you would type when configuring a device). Composite configuration templates are comprised of two or more CLI or composite configuration templates. You can specify the order in which the commands are deployed to devices.

Once you have created a set of templates, you can export and import them.

Create a New CLI Configuration Template Using a Blank Template

Use templates to define a set of reusable device configuration commands. A description of CLI templates and how you can use them is displayed in the web GUI when you choose Configuration > Templates > Features & Technologies, then choose CLI Templates.

If you want to edit a template that is provided with Cisco EPN Manager, make a copy of the template, give it a new name, and then edit it. See Create a New CLI Configuration Template Using An Existing Template.

Templates that you create are stored under My Templates.

Before you begin

Configuration templates are not supported by default on Cisco Optical Networking devices. To enable configuration templates support, select an existing pre-defined CLI configuration template, and in its Device Type section, enable the Optical Networking checkbox. Save this CLI template as a new template. The template is now saved as a user-defined template which lists all optical networking devices such as Cisco NCS 2000, Cisco NCS 4000 devices, and so on.

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies.

Step 2

Expand CLI Templates, then choose CLI.

Step 3

In the Template Basic area:

  1. Enter a meaningful name for the template. Templates are listed alphabetically in the web GUI.

  2. (Optional) Enter a short description that describes how the template should be used—for example, "enable traps on IOS devices."

  3. (Optional) Tag the template with an intuitive name. For information on tags, choose My Tags.

  4. Enter the device operating systems on which the template can be executed (for example, 12.2 or 15.3). When you execute the template, older device OS versions are filtered out. If you leave this field blank, the template will be applied all OSs for the specified devices.

Step 4

Specify the device configuration commands in the Template Detail area.

  1. Enter or paste the copied code into the CLI Content field. You can copy code from a command line configuration session, CLI script, or other stored set of configuration commands. You must enter code using Apache VTL.

  2. Configure your variables using the Add Variables dialog. Variables will prompt you for a value when you execute the template.

    • To create a variable using a name in the code, select the code (no spaces) and click the + sign at the top left of the Add Variables area. This creates a new (unconfigured) variable by that name in the Add Variables dialog.

    • Click the + sign at the top right of the Add Variables area. This adds a blank row to the Add Variables dialog.

    For information about creating variables, see Entering Variables in a Template.

  3. To see how the variable will be displayed when the template is executed, click Form View.

  4. To save your variables, click Add to CLI.

Step 5

Save your template. Click Save as New Template, specify the folder (in My Templates) in which you want to save the template, then click Save.

Note 
  1. Device configuration commands in the Template Detail area cannot contain special characters.

  2. Entering XML specific special characters in the Description field under the Template Basic area causes the template export to fail.


Create a New CLI Configuration Template Using An Existing Template

The easiest way to create a new configuration template is to find a similar existing template, copy it, and edit it. You can also use this procedure to edit templates that you created. (You can only edit templates that you create.)

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies.

Step 2

Expand CLI Templates, then choose System Templates - CLI.

Step 3

In the Template navigation panel on the left , locate the template you want to copy, hover your mouse cursor over the i icon that is displayed next to the template name, then click Duplicate in the popup window.

Step 4

In the Duplicate Template Creation dialog, specify a name and the folder (under My Templates) where you want the new template to be saved, and click OK.

For example, if you copy a template that resides under CLI Templates > System Templates - CLI, by default the template is saved under My Templates > CLI Templates > System Templates - CLI (User Defined) .

Step 5

Add the validation criteria and CLI content as described in Create a New CLI Configuration Template Using a Blank Template .


Entering Variables in a Template

These topics provide information that will help you when entering variables into a template:

Data Types

Table 1 lists data types that you can configure in the Manage Variables page.

Data Type

Description

String

Enables you to create a text box for CLI templates. To specify a validation expression and a default value, expand the row and configure the Default Value and Validation Expression fields.

Integer

Enables you to create a text box that accepts only numeric value. If you want to specify a range for the integer, expand the row and configure the Range From and To fields. To specify a validation expression and a default value, expand the row and configure the Default Value and Validation Expression fields.

DB

Enables you to specify a database type. See the Manage Database Variables in CLI Templates.

IPv4 Address

Enables you to create a text box that accepts only IPv4 addresses for CLI templates. To specify a validation expression and a default value, expand the row and configure the Default Value and Validation Expression fields.

Drop-down

Enables you to create a list for CLI templates. To specify a validation expression and a default value, expand the row and configure the Default Value field (with a comma-separated value for multiple lists which appears in the UI).

Check box

Enables you to create a check box for CLI templates.

To specify a validation expression and a default value, expand the row and configure the Default Value field.

Radio Button

Enables you to create a radio button for CLI templates. To specify a validation expression and a default value, expand the row and configure the Default Value field.

Text Area

Enables you to create a text area which allows multiline values for CLI templates. To specify a validation expression and a default value, expand the row and configure the Default Value and Validation Expression fields.

Manage Database Variables in CLI Templates

You can use database (DB) variables for the following reasons:

  • DB variables are one of the data types in CLI templates. You can use the DB variables to generate device-specific commands.

  • DB variables are predefined variables. To view the list of predefined DB variables, see the CLITemplateDbVariablesQuery.properties file at the following location: folder/opt/CSCOlumos/conf/ifm/template/inventoryTagsInTemplate.

  • For example, SysObjectID, IPAddress, ProductSeries, ImageVersion are DB variables.When a device is added to Cisco EPN Manager, the complete details of the device is collected in the DB variables. That is, the OID of the devices is collected in SysObjectID, product series in ProductSeries, image versions of the device in ImageVersion, and so on.

  • Using the data collected by the DB variables, accurate commands can be generated to the device.

  • You can select the DB variable in the Type field (using the Managed Variables page). Expand the name field and fill in the default value field with any of the DB variables which you want to use.

  • When a device is discovered and added to Cisco EPN Manager, you can use the database values that were gathered during the inventory collection to create CLI templates.


Note

While it is possible to create a customized query using Enterprise JavaBeans Query Language (EJB QL), only advanced developers should attempt this. We recommend you use the variables defined in the CLITemplateDbVariablesQuery.properties file only.

Use Validation Expressions

The values that you define in the Validation Expression are validated with the associated component value. For example, if you enter a default value and a validation expression value in the design flow, this will be validated during the design flow. That is, if the default value does not match with the entered value in the validation expression, you will encounter a get error at the design flow.


Note

The validation expression value works only for the string data type field.
For example, choose Configuration > Templates > Features and Technologies, then choose CLI Templates > CLI. In the Template Detail area, click the Add Variable tab to view the list of Variables. Click the Add plus sign (+) in the Add Variables tab to add a row to the CLI template. Choose String in the Type field, enter the remaining values, and click Save. From the list of variables, expand the details of this new variable and configure the regular expression, which will not allow a space in that text box. Enter the following expression in the Validation Expression field.

^[\S]+$

Default value (optional)—ncs

The value should match with regular expression in the validation expression field.

Save the template, and then select a device. Try to enter a space in the text field. You will encounter a regular expression error.

Add Multi-line Commands

To enter multi-line commands in the CLI Content area, use the following syntax:


<MLTCMD>First Line of Multiline Command
Second Line of Multiline Command
......
......
Last Line of Multiline Command</MLTCMD>

where:

  • <MLTCMD> and </MLTCMD> tags are case-sensitive and must be entered as uppercase.
  • The multi-line commands must be inserted between the <MLTCMD> and </MLTCMD> tags.
  • The tag cannot be started with a space.
  • The <MLTCMD> and </MLTCMD> tags cannot be used in a single line.

Example 1:


<MLTCMD>banner_motd Welcome to
Cisco. You are using
Multi-line commands.
</MLTCMD>

Example 2:


<MLTCMD>banner motd ~ ${message}
</MLTCMD>

where {message} is a multi-line input variable.

Restrictions for Using Multi-Line Banner Commands

Cisco EPN Manager does not support multi-line banner commands. You can use banner file xyz format as shown in the following example.
#conf t
Enter configuration commands, one per line. End with Ctrl-Z.
(config)#parameter-map type webauth global
(config-params-parameter-map)# type webauth
(config-params-parameter-map)#banner file tftp://209.165.202.10/banner.txt
(config-params-parameter-map)#^Z
#more tftp://192.168.0.0/banner.txt
Disclaimer:
Usage of this wireless network is restricted to authorized users only.
Unauthorized access is strictly forbidden.
All accesses are logged and can be monitored.
#

Add Enable Mode Commands

Use this syntax to add enable mode commands to your CLI templates:


#MODE_ENABLE<<commands >>#MODE_END_ENABLE

Add Interactive Commands

An interactive command contains the input that must be entered following the execution of a command.

To enter an interactive command in the CLI Content area, use the following syntax:


CLI Command<IQ>interactive question 1<R>command response 1 <IQ>interactive question 2<R>command response 2

where <IQ> and <R> tag are case-sensitive and must be entered as uppercase.

For example:


#INTERACTIVE
crypto key generate rsa general-keys <IQ>yes/no<R> no
#ENDS_INTERACTIVE


Note

You must replace the <IQ> tag with the <IQNONEWLINE> tag for any interactive questions in which the default <return> or newline character is not required in the command for any of the controller devices. For example,


#INTERACTIVE
transfer download start <IQNONEWLINE>y/N<R>y<IQNONEWLINE>y/N<R>y
#ENDS_INTERACTIVE


Note

The <IQ> tag utilizes regular expressions for interactive questions. You must use the valid regular expressions for matching patterns.

Format
#INTERACTIVE
commands<IQ>interactive question<R>response
#ENDS_INTERACTIVE
Example for invalid content used in interactive question
#INTERACTIVE
save config<IQ>Are you sure you want to save? (y/n)<R>y
#ENDS_INTERACTIVE

Using the Question Mark "?" in between is invalid and does not match the pattern.

Example for valid content used in interactive question
#INTERACTIVE
save config<IQ>(y/n)<R>y
#ENDS_INTERACTIVE

Combining Interactive Enable Mode Commands

Use this syntax to combine interactive Enable Mode commands:


#MODE_ENABLE
#INTERACTIVE
commands<IQ>interactive question<R>response
#ENDS_INTERACTIVE
#MODE_END_ENABLE

For example:


#MODE_ENABLE
#INTERACTIVE
mkdir <IQ>Create directory<R>XXX
#ENDS_INTERACTIVE
#MODE_END_ENABLE

Adding Interactive Multi-line Commands

This is an example of an interactive command that contains multiple lines:


#INTERACTIVE
macro name EgressQoS<IQ>Enter macro<R><MLTCMD>mls qos trust dscp
wrr-queue queue-limit 10 25 10 10 10 10 10
wrr-queue bandwidth 1 25 4 10 10 10 10
priority-queue queue-limit 15
wrr-queue random-detect 1
wrr-queue random-detect 2
wrr-queue random-detect 3
wrr-queue random-detect 4
wrr-queue random-detect 5
wrr-queue random-detect 6
wrr-queue random-detect 7
wrr-queue random-detect max-threshold 1 100 100 100 100
wrr-queue random-detect min-threshold 1 80 100 100 100
wrr-queue random-detect max-threshold 2 100 100 100 100
wrr-queue random-detect min-threshold 2 80 100 100 100
wrr-queue random-detect max-threshold 3 80 90 100 100
wrr-queue random-detect min-threshold 3 70 80 90 100
wrr-queue random-detect min-threshold 4 70 80 90 100
wrr-queue random-detect max-threshold 4 80 90 100 100
wrr-queue random-detect min-threshold 5 70 80 90 100
wrr-queue random-detect max-threshold 5 80 90 100 100
wrr-queue random-detect min-threshold 6 70 80 90 100
wrr-queue random-detect max-threshold 6 80 90 100 100
wrr-queue random-detect min-threshold 7 60 70 80 90
wrr-queue random-detect max-threshold 7 70 80 90 100
@</MLTCMD>
#ENDS_INTERACTIVE

Use Global Variables in a Template

Cisco EPN Manager enables you to deploy customized CLI configuration to your devices by creating CLI templates which contain these customized configuration options. When you create CLI templates or modify existing ones, you can define the content of the template using global and/or template variables.

  • Template variables: allow you to input values to the variable during CLI template or service creation.

  • Global variables: are predefined and associated with the CLI template or with a service at a global level (by default). You cannot view a global variable or input its values during service creation.

All variables names start with words that identify them as global or template variable. Global variables are accessible to all Cisco EPN Manager templates such as CLI templates or Composite templates. They identify the type of service (CE, L3VPN, CEM, etc.) that the variable can be associated with. If you create a new global variable, you must ensure that you specify a name that starts with the letters 'gv' followed by other words that promote easy identification of the variable. Global variables that you create, can be further edited and deleted. The global variables available in Cisco EPN Manager by default, cannot be edited or deleted. While global variables are applicable to all template types, the variables created specifically during CLI template creation are applicable to that template alone. These variables created during CLI template creation cannot be associated with other CLI templates.

In the CLI template configuration example shown below, 'gv.service-ethernet-maintInterfaceName' represents the global variable. If this template is associated with a service, then during service creation, the dynamic part of the global variable, 'mainInterfaceName', is replaced by the values (such as the ethernet interface, in case of CE services) specified in the service. However, you will not be able to view or modify this global variable during service creation. '$descr' is a static value which represents the template variable. During service creation, this template variable will enable you to modify or specify a value of the type String (for the description field).

interface $gv.service-ethernet-mainInterfaceName
             description $descr
          exit

To use global variables to create CLI templates:

Procedure


Step 1

Choose Configuration > Templates > Global Variable to create new global variables.

To use existing global variables that are pre-populated in Cisco EPN Manager for each service type (CE, L3VPN, and CEM), skip to Step 4.

Step 2

Click the Add '+' icon. To edit existing variables, select the global variable and click the Edit button.

Step 3

Specify the following parameters and click Save. Your changes are saved in the Cisco EPN Manager database and are not immediately deployed to the device.

  • Name: Enter a unique name for the variable ensuring that the name starts with the letters 'gv' followed by the type of service this global variable is relevant to. You can use special characters such as the dot, hyphen, and underscore.

  • Description: Enter a unique description for easy identification of the variable. This description is extremely important to help identify the purpose of this variable that may be used in CLI templates. The CLI templates could further be used to provision services (such as L2 and L3 services). And on the service creation page, you will rely completely on the variable description to identify the purpose of the variable.

  • Type: Use one of the following options to specify the type of variable:

    • String: Enables you to create a text box for CLI templates. Only the string type of variable is applicable to CLI templates used in service provisioning.

    • Integer: Enables you to create a text box that accepts only numeric value. It can later be configured to specify a range for the value.

    • IPv4 Address: Enables you to create a text box that accepts only IPv4 addresses for CLI templates.

    • Drop-down: Enables you to create a drop-down list for CLI templates.

    • Check box: Enables you to create a check box field for CLI templates.

    • Radio Button: Enables you to create a radio button for CLI templates.

    • Text Area: Enables you to create a text area which allows multiline values for CLI templates.

  • Value: Specify the values that must be generated based on the selected Type values explained above.

    If you want to specify the value during service creation or during CLI template creation, you can choose 'Not Available' as a place holder.

  • Display Label: Enter how you want the variable to be displayed in the Cisco EPN Manager GUI.

Step 4

Associate the global variable with a CLI template:

  1. Navigate to Configuration > Templates > Features & Technologies.

  2. To create a new CLI template from scratch, see Create a New CLI Configuration Template Using a Blank Template.

  3. To associate global variables with existing templates, see Create a New CLI Configuration Template Using An Existing Template.

  4. To add global variables, from the Template Details section, use the Add Global Variable search field to locate the global variable. For easy identification, you can also use the Global Variable hyperlink displayed at the top right corner of the page. You can use global variables along with CLI, and/or template variables in the same CLI template.

You can identify the services that the variables belong to by looking at the variable name. Variables applicable to CE services, have variable names that start with the letters 'gv.ce-service-ethernet*'. Variables applicable to L3VPN services, have variable names that start with the letters 'gv.l3vpn-service-l3vpn*'. These variables can be associated with new or existing CLI templates.

  1. Make the required changes to the CLI template and click Save as New Template.

  2. The CLI template is now saved and displayed under My Templates > CLI Templates (User Defined).

  3. (Optional) Deploy the CLI template to the devices as explained in Deploy Templates to Devices.

Step 5

(Optional) To provision services (L2, L3VPN, CEM, Flex LSP, Layer 3 link) using CLI templates (associated with global and template variables), see, Extend a Circuit/VC Using Templates.


Example

Sample Global Variables Available in Cisco EPN Manager:
  • Following are the sample global variables that can be used with L3VPN services:

  • Following are the sample global variables that can be used with CEM services:



Import and Export a CLI Configuration Template

These topics explain how to export and import configuration templates. Templates can be exported templates have an .xml file name; multiple templates are exported as a zip file.

  • If you export multiple configuration templates, the .xml files are placed in a zip file with the prefix name Exported Templates.

  • Single files are exported and imported as .xml files

  • You can import multiple .xml files by selecting individual files or by importing a zip file.

  • When you import CLI templates, the user-defined global variables that are part of the file are not imported automatically. You need to add these variables to the CLI template manually.

  • When you import CLI templates using CLI commands, ensure to use the variable names with valid syntax. The variable name should start with alphabets or an underscore (_). Supported special characters are underscore and hyphen.


    Warning

    Template variables will not be validated during import, so ensure to use the proper variable names.


Procedure


Step 1

Choose Configuration > Templates > Features & Technologies. > Templates > Features & Technologies.

Step 2

To export a configuration template:

  1. Select the template(s) that you want to export and click .

  2. Save the files at the desired location.

Note 

Template export fails if there are XML specific special characters in the Description or Template Detail fields.

Step 3

To import a configuration template:

  1. Under the CLI Templates folder, hover your mouse cursor over the "i" next to CLI.

  2. Click Show All Templates, then click Import.

  3. In the Import Templates dialog box, choose the My Templates folder where you want to import the templates, then click Select Templates and navigate to the file you want to import.

  4. Confirm your choices, then click OK.


Create a New Composite Template

All out-of-the-box and user-created templates can be added to a single composite template, which aggregates all of the individual feature templates that you need. When you create a composite template, you can also specify the order in which member templates should be executed. You can use composite templates to make changes to single or groups of devices.

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies.

Step 2

Expand the Composite Templates folder and choose Composite Templates.

Step 3

In the Template Basic area, enter a name for the template.

Step 4

In the Template Detail area, choose the templates to include in the composite template. Using the arrows, place the templates in the in the order in which they should be deployed to the devices. For example, to create an ACL and associate it with an interface, put the ACL template first, followed by the interface template.

Step 5

Click Save as New Template. After you save the template, and apply it to your devices (see ).


Create a Shortcut to Your Templates Using Tags

When you apply a tag to a template, the template is listed under the My Tags folder. Tagging a configuration template helps you:

  • Search a template using the tag name in the search field
  • Use the tagged template as a reference to configure more devices

To tag an existing template, follow these steps:

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies.

Step 2

Expand the My Templates folder and choose the template that you want to tag.

Step 3

Enter a tag name in the Tag as text box, then click Save.


Create a Troubleshooting Template

Use troubleshooting templates to define a set of reusable non-configuration commands (for example "show" command) to run on the devices.

To create a Troubleshooting template:

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies.

Step 2

Expand CLI Templates, then choose CLI.

Step 3

In the Template Basic area:

  1. Enter a name for the template.

  2. Select the Troubleshooting Template checkbox. Doing this will change the template to a troubleshooting template and tag it as a troubleshooting template.

Note 
  1. You can create troubleshooting templates only of type devices.

  2. Do not edit the 'TroubleshootingTemplate' tag in the Tags field.

Step 4

Specify the commands and variables as required in the Template Detail area. For information about creating variables, see Entering Variables in a Template.

Step 5

Save your template. Click Save as New Template, specify the folder (in My Templates) in which you want to save the template, then click Save.



Note

"MODE_ENABLE” cannot be used with Troubleshooting templates.


What to do next

The procedure to deploy the troubleshooting template and edit/retry a failed template deployment is similar to that in case of CLI templates. Refer to the following sections:

Deploy Templates to Devices

These topics describe the ways you can deploy (run) groups of commands on devices using configuration templates:

Control Configuration Deployment Behavior

As an administrator, you can choose to have device configurations backed up or rolled back when users deploy new device configuration templates.

Archive Device Configurations Before Template Deployment

Cisco EPN Manager automatically backs up all device running and startup/admin configurations before deploying new configuration templates if the Backup Device Configuration setting is enabled.

  1. Choose Administration > Settings > System Settings > Inventory > Configuration.

  2. Select the Backup Device Configuration check box.

  3. Click Save.

Roll Back Device Configurations on Template Deployment Failure

Cisco EPN Manager automatically rolls back each device to its last archived running and startup/admin configurations when any attempt to deploy a new configuration template to the device has failed.

  1. Choose Administration > Settings > System Settings > Inventory > Configuration.

  2. Select the Rollback Configuration check box.

  3. Click Save.

Create Configuration Groups for Deploying Templates to Groups of Devices

If you have devices that require the same configuration, you can create a configuration group that contains devices and templates that can be applied to those devices. Creating a configuration group allows you to quickly apply new templates without remembering to which devices the new templates should be deployed.

Composite templates allow you to group smaller templates together, but configuration groups specify the relationship between the templates and the groups of devices, and the order in which commands are executed.

Procedure


Step 1

Choose Configuration > Templates > Configuration Groups.

Step 2

In the Configuration Group Basic area, enter a name.

Step 3

To display devices from which you can make selections, in the Template Selection area, add one or more templates by clicking Add and selecting the templates. This also populates the Device Type field.

Step 4

Add additional templates by clicking Add in the Template Selection area. You cannot choose templates that are mutually-exclusive; for example, you cannot choose Add-Host-Name-IOS and Add-Host-Name-IOS-XR.

Step 5

Select the devices on which you want to deploy the template, then click Next to choose the input option.

Step 6

In the Device Selection area, select the devices you want to add to the configuration group.

Step 7

If you have multiple templates, the order in which templates will be listed by selecting one and clicking the up or down arrow.

Step 8

Click Save as New Configuration Group.


Deployment Flow for Configuration Group Using the Wizard


Note

This deployment flow is not applicable for Controller based templates.


Procedure


Step 1

After you create a configuration group, click Deploy. The Template Deployment -Prepare and Schedule wizard page opens.

Step 2

In the Templates area, view the templates that are added in the configuration group.

Step 3

In the Deployed on Devices area and during creation of Configuration Group, view the devices that you have chosen during creation of configuration group.

Step 4

In the Value Assignment area, from the Select Template drop-down list, choose a CLI template and an appropriate device. You can view the device details on which the template is going to be deployed, CLI Preview details, and so on. Click Apply.

Step 5

(Optional) Schedule the deployment job in the Schedule area:

  • Create a meaningful deployment job name, then specify whether to run the now or in the future.

  • You can also schedule the job to run periodically on hourly, daily, weekly, monthly or yearly basis.

  • You can configure the following job options:

    Failure Policy:

    • Ignore failure and continue—This is the default option. The devices are randomly picked up for template deployment. If the job fails on a device, the job skips the device and continues with the remaining devices. The Job results show success/failure information for all the selected devices.

    • Stop on failure—If the job fails to execute on a device, the job is stopped. The job results are updated only for the devices on which the job was executed successfully and for other devices which didn’t undergo template deployment, “Not Attempted” message is shown. The order of devices chosen for deployment will be same as the device order in Value assignment pane.

    • Copy Running Config to Startup—If the template deployment job succeeds, the running configuration of the device is copied to startup configuration.

    • Archive Config after deploy—Creates a new config archive job and archives the configuration of devices after successfully deploying the template.

Step 6

In the Summary area, view the summary of the deployment.

Step 7

Click OK to deploy the template.

Step 8

Click Job Status in the pop-up dialog box to launch the Job Dashboard to view the status of the job.


Deployment Flow for CLI Templates using the Wizard

Procedure


Step 1

After creating the CLI template, click Deploy. The Deployment Wizard page opens.

Step 2

Select the devices on which you want to deploy the template, then click Next to choose the input option.

Step 3

Select the devices on which you want to deploy the template from the Add devices table. The selected devices appear in the Devices to deploy table.

Step 4

Select the mode in which you want to deploy the template. The options are Work Flow and Export/Import CSV.

Step 5

Click the Work Flow option and click Next. See Step 6 .

Step 6

Alternately, click Export/Import CSV option, to update all the template properties for the selected devices using the CSV Export/Import mechanism.

  1. Uncheck the Do you want Optional Parameters check box, if you want to skip the optional fields while filling the configuration values in the CSV file.

  2. Click Export CSV to download the CSV template to your local system.

  3. Enter the configuration values for each specific device in the downloaded CSV template.

  4. Click Import CSV to upload the updated CSV file. The input values automatically get updated.

  5. Click Next to input values.

Step 7

In the Input Values tab, you can toggle between Form and CLI view. Configure the following in the Input Values tab:

  1. Enter all the mandatory fields for each template, then click Apply.

    Note 

    For profile management, Fault-Profile-Definition and Fault-Profile-Apply templates are available. While deploying these templates, in the Input Values window you must enter the applicable fault tags for the selected fault type from the reference table.

    If the validation is successful, then the border of the circle around the selected template changes to green.

    Note 
    The successful validation message means that the change has been applied only to the selected devices in the workflow. To complete the configuration, perform the remaining steps in the procedure.
Step 8

After entering the necessary configuration values, click Next or CLI to confirm the device and template configuration values.

Step 9

Schedule the deployment job using Schedule Deployment tab, if necessary:

  • Create a meaningful deployment job name, then specify whether to run now or in the future.

  • You can also schedule the job to run periodically on hourly, daily, weekly, monthly, or yearly basis.

  • You can configure the following job options:

    Failure Policy:

    • Ignore failure and continue—This is the default option. The devices are randomly picked up for template deployment. If the job fails on a device, the job skips the device and continues with the remaining devices. The Job results show success/failure information for all the selected devices.

    • Stop on failure—If the job fails to execute on a device, the job is stopped. The job results are updated only for the devices on which the job was executed successfully and for other devices which didn’t undergo template deployment, “Not Attempted” message is shown. The order of devices that are chosen for deployment will be same as the device order in Value assignment pane.

    • Copy Running Config to Startup—If the template deployment job succeeds, the running configuration of the device is copied to startup configuration.

    • Archive Config after deploy—Creates a new config archive job and archives the configuration of devices after successfully deploying the template.

Step 10

Click Next to view the job deployment summary.

Step 11

On the Deployment Summary tab, you can see the CLI view o each device.

Step 12

Click Finish to deploy the template.

Step 13

Click Job Status in the pop-up dialog box to launch the Job Dashboard to view the status of the job.

Note 

The SG220 device does not support any of the configuration template deployments whereas the SG300 and SG500 devices support CLI template deployment. However, both the SG300 and SG500 devices support only the following system CLI templates.

  • APIC Bootstrap

  • Banner Configuration-IOS

  • Best_Practice_Access_3k

  • Best_Practice_Access_4k

  • Best_Practice_Global

  • Certificate Authority-IOS

  • Configure SNMPv3

  • Configure VLAN

  • Configure_Access_Port

  • Crypto Map Configuration

  • DNS Configuration

  • EEM Environmental Variables

  • Enable Password-IOS

  • EtherChannel

  • HTTP SWIM Image Upgrade Template

  • HTTP-HTTPS Server and WSMA Configuration-IOS

  • Local Management User

  • Plug And Play Bootstrap

  • Reload Configuration-IOS

  • TACACS Server

  • TACACS-POST-PNP

  • Trap Receiver

  • stp

Note 

You can also push a template-based configuration (user-defined template or system-defined template) to devices by choosing Inventory > Device Management > Configuration Archive > Devices/Archives > Deploy Config.


Deployment Flow for Composite Templates Using the Wizard

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies > Composite Templates > Composite Templates.

Step 2

Enter the required information in the Template Basic section.

Step 3

In the Template Detail section, choose the templates to include in the composite template, and click Save as New Template.

Step 4

After creating the composite template, click Deploy. The Deployment wizard page opens.

Step 5

Select the devices on which you want to deploy the template.

Step 6

Select the devices on which you want to deploy the template from the Add devices table. The selected devices appear in the Devices to deploy table.

Step 7

Select the mode in which you want to deploy the template. The options are Work Flow and Export/Import CSV.

Step 8

Click the Work Flow option and click Next. See Step 6.

Step 9

Alternately, click Export/Import CSV option, to update all the template properties for the selected devices using the CSV Export/Import mechanism.

  1. Uncheck the Do you want Optional Parameters check box, if you want to skip the optional fields while filling the configuration values in the CSV file.

  2. Click Export CSV to download the CSV template to your local system.

  3. Enter the configuration values for each specific device in the downloaded CSV template.

  4. Click Import CSV to upload the updated CSV file.The input values automatically gets updated.

  5. Click Next to input values.

Step 10

In the Input Values tab, you can toggle between Form and CLI view. Configure the following in the Input Values tab:

  1. Select templates for a device from the navigation widget. To select templates, click the circle (T1, T2, T3, T4, T5 ...) in the upper right corner. If there are more than five templates, click three dots. The drop-down list will pop-up with all the available templates.

  2. Enter all the mandatory fields for each template, then click Apply.

    If the validation is successful, then the border of the circle around the selected template changes to green and green tick mark appears adjacent to the selected templates for the available templates in the popup.

Step 11

After entering the necessary configuration values, click Next or CLI to confirm the device and template configuration values.

Step 12

Schedule the deployment job using Schedule Deployment tab, if required:

  • Create a meaningful deployment job name, then specify whether to run the now or in the future.

  • You can also schedule the job to run periodically on hourly, daily, weekly, monthly or yearly basis.

  • You can configure the following job options:

    Failure Policy:

    • Ignore failure and continue—This is the default option. The devices are randomly picked up for template deployment. If the job fails on a device, the job skips the device and continues with the remaining devices. The Job results show success/failure information for all the selected devices.

    • Stop on failure—If the job fails to execute on a device, the job is stopped. The job results are updated only for the devices on which the job was executed successfully and for other devices which didn’t undergo template deployment, “Not Attempted” message is shown. The order of devices chosen for deployment will be same as the device order in Value assignment pane.

    • Copy Running Config to Startup—If the template deployment job succeeds, the running configuration of the device is copied to startup configuration.

    • Archive Config after deploy—Creates a new config archive job and archives the configuration of devices after successfully deploying the template.

Step 13

Click Next to view the job deployment summary.

Step 14

On the Deployment Summary tab, you will see the CLI view for each of the device.

Step 15

Click Finish to deploy the template.

Step 16

Click Job Status in the pop-up dialog box to launch the Job Dashboard to view the status of the job.


Deploy Templates to Devices Without Using Configuration Groups

Once a template is saved, it can be deployed (run on) devices. You can deploy a template from the Configuration > Templates > Features & Technologies navigation area, or by using Configuration Groups, which is launched from Configuration > Templates > Configuration Groups (see Create Configuration Groups for Deploying Templates to Groups of Devices).

To deploy a customized or system template from the Features & Technologies navigation area:

Procedure


Step 1

Choose Configuration > Templates > Features & Technologies

Step 2

Expand the drawer that contains the template(s) you want to deploy.

Step 3

Choose the templates you want to deploy, and click Deploy.

Step 4

In the Template Deployment window, check the settings and schedule and click OK .


Role-Based Access Control for Template Deployment

Cisco EPN Manager supports role-based restrictions for template deployment. With this feature, you can allow users from an authorized user group to only view and deploy a template. All other operations on the template such as Create, Edit, Delete, Import, and Export are restricted.


Note

This feature is applicable only for CLI templates.

Enable role-based access for template deployment

To enable role-based access control for template deployment, login as a Root, Admin, or Config user and assign the template to a user group from the User group drop-down list in the Template Basic area (Configuration > Templates > Features & Technologies > CLI Templates > CLI). The User group drop-down list contains only those user groups that have been configured with task permissions mentioned earlier. You can assign the template to one or more user groups from this list.

After you have assigned the template to a user group, only users from the authorized user group can view and deploy the template. Users from unauthorized user groups cannot view the template.

For a composite template, only users with appropriate user group permissions to execute all the included CLI Templates are allowed to deploy the template.

Deploy users can edit or run the job only for the templates that are assigned to the associated user group.


Note

  • Templates that are not assigned to any user group can be accessed and deployed by all users.

  • When importing templates associated with user group(s), ensure that the deploy ‘user group’ roles are same between source and destination system for the RBAC template to work seamlessly.

  • In case of any mismatch in the deploy user group roles, it is recommended that you reassign the template to the user group OR edit the template to remove all existing user group(s) associations and save the template.


Check the Status and Results of a Deployed Configuration Template

When you deploy a configuration template, Cisco EPN Manager displays a dialog box with a hyperlink that directs you to the Jobs window. From here you can:

  • View the results of the command by clicking the History tab and expanding the job instance.
  • Repeat the deployment, or schedule it for a later time
  • Manage the job (delete it, pause it, resume it, and so forth).

Template Deployment Failure Syslog

When a template deployment to the device fails, Cisco EPN Manager generates a syslog with severity ERROR and sends it to the destination IP that is configured in EPNM.

To configure this destination IP, see Forward System Audit Logs As Syslogs for more information.

To enable generation of the syslog :

  1. Navigate to Administration > Settings > Logging > Syslog Logging Options.

  2. Select the Enable Syslog checkbox.

Edit and Retry a Failed Template Deployment

A template deployment may fail on device(s) partially or completely due to incorrect or invalid values provided during deployment.

The Edit and Retry functionality helps to re-execute such failed jobs by modifying the previously provided inputs.


Important

You can use the Edit and Retry functionality to re-execute failed jobs in case of CLI templates, Troubleshooting templates and Composite Templates.


You can view the status of the job in Job Dashboard. The Edit icon () will be enabled on the failed configuration template jobs. On clicking this icon, the Template Deployment - Edit and Retry window opens, which helps you to correct previously provided input(s) and retry the deployment.

The template deployment may fail due to any of the following reasons:

  1. Incorrect/unsupported values provided for variables:

    1. Choose Administration > Dashboards > Job Dashboard.

    2. Select the failed deployment job in the Jobs page.

    3. Click the Edit icon. Edit the values as required in the Template Deployment - Edit and Retry window, and then click OK.

  2. One or more device(s) unreachable/wrong credentials:

    1. Fix the device reachability issues.

    2. Choose Administration > Dashboards > Job Dashboard.

    3. Select the failed deployment job in the Jobs page.

    4. Click Run in the Jobs page to re-run the deployment.

  3. Incorrect/invalid commands in configuration templates:

    This requires modification of the template. You can not use the Edit and Retry functionality in this case.

If you modify the original template, edit and retry for the failed configuration template job will be blocked. For modified templates, you should deploy the templates using the Deployment wizard.


Note

  • Edit and retry operation is not supported for configuration groups, and templates of type Ports.

  • If you are upgrading to Cisco EPN Manager 5.1, you must clear the browser cache before attempting this operation.