Creating and deploying network views from templates automatically

Create network views from templates and assign them to groups or users automatically using auto-provision scripts.

About this task

To deploy the templates, you must create an auto-provision script. This script performs the following tasks:
  • Creates a top-level dynamic view node in the Network Views Navigation Panel, using a specified name
  • Generates a set of network views using a specified template, and puts the template in the top-level dynamic view node in the Navigation Panel
  • Assigns the network views generated to a specified user or user group.
  • Uses a specified domain.

Every 60 seconds the $NMGUI_HOME/profile/etc/tnm/autoprovision/ directory is monitored for new auto-provision scripts. When a new auto-provision script is found, the script is read and processed, and the dynamic network view referenced in the script is created and assigned to the specified user or user groups.

When a script is processed, the suffix .processed is added to the file name, whether or not any network views were created. Files which end in .processed are not processed again. If you want to rerun a script, remove the .processed from the end of the file name, so that the file name ends in .xml.

Note: Auto-provisioned network views are created only when the tnm.database.createDefaultNetworkView parameter in tnm.properties is set to true. By default, this parameter is set to false. The default setting can be overridden during installation by selecting the Create default Network Views in selected database check box in Topology Database panel.

To deploy preconfigured network views automatically:

Procedure

  1. Define the template as an XML file and save the template to the $NMGUI_HOME/profile/etc/tnm/dynamictemplates/ directory.
  2. Create the auto-provision script in XML and copy it into the $NMGUI_HOME/profile/etc/tnm/autoprovision/ directory.
    See Sample auto-provision script for an example.
    The script is automatically processed within 60 seconds and the specified network views are created in the specified domain for the specified users and groups.
  3. If a network topology exists for the specified domain, the new network views are automatically populated with devices. If no discovery has been run, the network views are populated when a discovery has been run in the appropriate domain.
    Restriction: If the domain referenced in the auto-provision script does not exist at the time that the script is processed, no network views are created. You need to first create the domain, and then create the network views. This is true even if you create a script that references all domains using a wildcard "*".

Sample auto-provision script

The following sample auto-provision script creates a view called NCOMS View and creates a set of views underneath using the dynamic view template ipdefault. These views are assigned to the itnmadmin user and use the domain NCOMS.

<autoProvision name="NCOMS View" domain="NCOMS" accessLevel="user" accessId="itnmadmin">
        <dynamicViewTemplate id="ipdefault" />
</autoProvision>