Important

   

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

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

 Ensure that JRE 8 is installed on the computer on which this utility is run.

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:

ParameterDescription
maxConcurrentTemplatePushSpecifies the maximum number of template push actions that can be executed in parallel.
senderEmailAddressSpecifies the sender's email address.
smtpGatewaySpecifies the SMTP gateway details.
wsRequestTimeoutInMillisecondsSpecifies 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>

Back to top

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:

OptionDescriptionRequired?
-?
Displays helpNo
-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

Back to top

Examples

 The following table describes various use cases for the single server template push extension: 

ExampleDescription
single-server-template-push.bat -?
(Windows) Displays the options available to launch the utility 
single-server-template-push.bat –url https://localhost
-user sysadmin -password sysadmin2 –deployTemplateName
newConfigtemplate –deviceList C:\Inputs\devices.csv
(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
-user sysadmin -password sysadmin –deployTemplateName
newConfigtemplate –deviceList  /home/shthompson/
devices.csv -syntaxScan true –makeTrusted true –commit
true

(Linux) Deploys newConfigtemplate with the given runtime parameters and performs the following actions:

  • Scan Syntax
  • Mark As Trusted
  • Commit

Attached is a sample CSV file, which contains VLAN and Boundary as the runtime parameters.

single-server-template-push.sh –url https://localhost
-user sysadmin -password sysadmin2 –deployTemplateName
newConfigtemplate -deviceList /home/shthompson/
devices.csv -email “john_smith@abc.com shirley_thompson
@hotmail.com” –format html

(Linux) Deploys newConfigtemplate with the given runtime parameters on the devices specified in the devices.csv file and sends
a report in HTML format via email to John and Shirley

Back to top

Related topic

Using the multi-server template push extension

Was this page helpful? Yes No Submitting... Thank you

Comments