Using the single server template push extension
The single server template push extension provides an easy way to deploy a template from a source server to a number of devices, which might be present on a given server. You can pass the runtime parameters required for the template through a CSV file. For the specified server, the template push extension executes the Deploy to Active action, during which the template with the specified runtime parameters is deployed to the active configuration of the devices. This extension is a web service client that is launched by running a script by using the CLI.
Note
This topic includes the following sections:
About the single server template push extension
The single server template push extension is installed with TrueSight Network Automation. Before using it, extract the BCAN_HOME\public\bmc\bca-networks\extras\bcan-template-push-extension-v.r.mm.zip file into any convenient directory.
Tip
For consistency with other utilities, extract the file into the BCAN_DATA directory.
Extracting the zip file creates a bcan-template-push-extension subdirectory structure. The following utility script is included in the bcan-template-push-extension\bin directory:
- (Windows) single-server-template-push.bat
- (Linux) single-server-template-push.sh
The bcan-template-push-extension\bin directory also includes the TemplatePushConfig.xml file, in which you need to specify various parameters.
TemplatePushConfig.xml input file
The TemplatePushConfig.xml file enables you to specify the following parameters:
Parameter | Description |
---|---|
maxConcurrentTemplatePush | Specifies the maximum number of template push actions that can be executed in parallel. |
senderEmailAddress | Specifies the sender's email address. |
smtpGateway | Specifies the SMTP gateway details. |
wsRequestTimeoutInMilliseconds | Specifies the maximum time after which the web service request will time out. |
The following code snippet shows the TemplatePushConfig.xml file:
<?xml version="1.0"encoding="UTF-8" standalone="yes"?>
<!--source server details, email sending details, timeoutmillis for template
push-->
<tpeConfig>
<maxConcurrentTemplatePush><!--maximum concurrent template push actions.
This value should be between 1 and 30.-->
</maxConcurrentTemplatePush>
<senderEmailAddress>localhost@bmc.com</senderEmailAddress>
<smtpGateway><!-- smtp gateway --></smtpGateway>
<!-- timeoutmillis for which server will be authenticated-->
<wsRequestTimeoutInMilliseconds><!-- long value for timeout -->
</wsRequestTimeoutInMilliseconds>
</tpeConfig>
Launching the single server template push extension
To launch the extension, modify the TemplatePushConfig.xml file, as required and run the single-server-template-push script from the CLI. The single-server-template-push utility script has the options listed in the following table:
Option | Description | Required? |
---|---|---|
-? | Displays help | No |
-url arg | Specifies the URL of the TrueSight Network Automation server For example, https://localhost:443, where 443 is the default port. Port number is required if the TrueSight Network Automation server is installed on a non-default port. Otherwise, you can omit the port number. | Yes |
-user arg | Specifies a valid user name on the the TrueSight Network Automation server | Yes |
-password arg | Specifies a valid password for the user name on the the TrueSight Network Automation server | Yes |
-deployTemplateName arg | Specifies the name of the template that must be deployed on the devices. If you do not specify this option, the extension generates an error message and exits the system. | Yes |
-deviceList arg | Specifies a .csv file that contains a list of device names and runtime parameters corresponding to each device. You can specify up to 2000 characters in the runtime parameter value. The .csv file name must include the complete path to the file. | Yes |
-syntaxScan arg | Indicates whether a Scan Syntax action should be performed on the template before the Deploy to Active action. Valid values: true, false (default) | No |
-makeTrusted arg | Indicates whether a Mark As Trusted action should be performed on the resulting configuration of devices. Valid values: true, false (default) | No |
-commit arg | Indicates whether a Commit action should be performed on the resulting configuration of devices. Valid values: true, false (default) | No |
-email arg | Specifies a list of recipient email addresses to whom the template push summary report is mailed. You can specify multiple email addresses enclosed in quotation marks and separated by a space, for example "john_smith@abc.com shirley_thompson@hotmail.com”. If you do not specify this option, no email is sent. | No |
-format arg | Sets the format in which the template push summary report is mailed to the recipients. Valid values: RTF, HTML, PDF (default) | No |
Examples
The following table describes various use cases for the single server template push extension:
Example | Description |
---|---|
single-server-template-push.bat -? | (Windows) Displays the options available to launch the utility |
single-server-template-push.bat –url https://localhost | (Windows) Deploys newConfigtemplate with the given runtime parameters on the devices specified in the devices.csv file |
single-server-template-push.sh –url https://localhost | (Linux) Deploys newConfigtemplate with the given runtime parameters and performs the following actions:
Attached is a sample CSV file, which contains VLAN and Boundary as the runtime parameters. |
single-server-template-push.sh –url https://localhost | (Linux) Deploys newConfigtemplate with the given runtime parameters on the devices specified in the devices.csv file and sends |
Comments
Log in or register to comment.