How to: Create and Use Dynamic Templates in ZPE Cloud

How to: Create and Use Dynamic Templates in ZPE Cloud

ZPE Cloud Dynamic Template can be used to apply a dynamic configuration/script to one or more devices.  It can contain variables which have different values depending on the device it is applied to.

Variables are defined under "Custom Fields" tab in ZPE  Cloud Profiles section.  The value of the custom field is related to the scope of the device based on the group it belongs to or the site it belongs to.  Some custom fields can be targeted only to specific devices.

Example of adding custom field:

Templates are defined in "Profiles::Configuration".  To create the dynamic template, select the Add option, ensure "Dynamic Template" checkbox is set and add a script/configuration using custom fields you have created previously.  Below is a sample of dynamic template

  1. set /settings/network_connections/ETH1 ipv4_mode=static
    set /settings/network_connections/ETH1 ipv4_address={{mt_eth1_address}}
    set /settings/network_connections/ETH1 ipv4_bitmask={{mt_eth1_bitmask}}
This template sets ETH1 interface with static IP.  The value is looked up in the variable "mt_eth1_address" which is previously created in Custom Fields section.  After the template is saved, you can apply to any device like any other profile.

To understand how the values will change, review this table:

If the dynamic template is applied to the device named MT-THERA, then mt_eth1_address=, mt_eth1_bitmask=16.  If the dynamic template is applied to device named MT-VESUVIUS, then mt_eth1_address=, mt_eth1_bitmask=16.

    • Related Articles

    • How to: Create and apply configurations to your device using ZPE Cloud

      Overview ZPE Cloud profiles enable to perform operations to your Nodegrid devices, such as: configurations, custom scripts, backups, software upgrades, and cellular modem firmware upgrades. In this document, we are focusing on the configuration ...
    • How to: Create and Use Custom Fields in ZPE Cloud

      Custom fields is a way to make your profiles/templates more dynamic. A custom field is similar to a variable in that it can have different values depending on the scope of the field. You can create a custom field under "Profiles::Custom Fields". ...
    • How to: Enable ZPE Cloud Remote Access...Remotely

      You just got your ZPE Nodegrid up and running and it is connected and enrolled in your ZPE Cloud. But you can't access it remotely because the remote access buttons are grayed out. It is online, but no access available. The way to get remote access ...
    • How to: Create a ZPE Cloud account and add ZPE Cloud users 

      To create ZPE Cloud users, you must have a ZPE Cloud account. ZPE Cloud accounts are bonded to your company. Company is the denomination of your tenant in ZPE Cloud. The ZPE Cloud account manages the ZPE Cloud company. 1. Access or ...
    • How to: Software Upgrade a Nodegrid device using ZPE Cloud

      How to: Update a Nodegrid device using ZPE Cloud ZPE cloud enables managing on-demand and scheduled software updates of your Nodegrid devices. 1. Login to ZPE Cloud 2. Go to Devices :: Enrolled 3. Select the device you want to update and then click ...