How to set template variables for Pilot R200

.... Never mind.  Found it in the manual.

For those having the same issue, below is the relevant section from the manual.  While creating a configuration job variables will need to be entered for devices using the "Configure" gear icon on the right side of the device row.

Configuration Variables

Administrators can embed variables into templates that will be replaced when the template is applied to a device. This allows one to leverage a shared, generic template, but to tailor it to individual devices when it is pushed. Template variables are added to a configuration file by replacing an existing parameter with a customer-defined string of the format ${VARIABLE}. An example configuration line with a single variable replacement is shown below:

The above variable is named IP_ADDRESS. When the template is pushed to a device, this variable will be replaced with a value specific to the device. This value needs to be set for the device prior to the template application, else the configuration will not be pushed. Default values can also be specified for variables, as shown below:

The default value is "10.1.1.254" (it includes the quotes). In this case if the variable is not set for a device, the default value will be used.

Variable Usage

The graphic below highlights how Templates and Variables are merged to create the final configuration that is pushed to the device.

Figure 3  Variable Usage

1 Like

hi, i need to obtain dinamically the SerialNumber to use in the template (for example SSID1=${SSID="SERIALNUMBEROFTHEQUIPMENT"})

is possible?

thanks,

regards,

Michele Pietravalle

Hi Michele,

It is not possible in the current version of cnMaestro.  However, support for this is being added in a future release to allow inserting values of devices MAC addresses and serial numbers.

Ok, thanks. Now is not possible to insert in the template  ANY value related to the hardware?

thanks,

best regards,

Michele

Correct.  Currently it is only possible to insert user-specified values with ${VALUE} replacement variables.

1 Like

I'm trying to use a replacement variable to set the color code as shown below on cnMAestro 1.2.2

  "smRadioConfig": {
   "powerUpMode": 0,
   "apSelection": 0,
   "colorCodeList": [
    {
     "colorCode": ${COLOR_CODE=0},
     "priority": 1
    }
   ],
   "bandwidthScanList": [
    150,
    200
   ]
  }

When I try and save the template I rewceive a JSON validation error. Yet one of the default PMP450i templates show this exact setup??!!

The color code is in INTEGER value and cannot be quoted "". How can I acvheive this?

Thanks.

Hi James,

We are aware of this issue and are working on a fix.  Currently replacement variables must be surrounded by quotes for JSON-based templates.  The fix is being tracked by ticket CNSSNG-4018.


@Jordan wrote:

Hi James,

We are aware of this issue and are working on a fix.  Currently replacement variables must be surrounded by quotes for JSON-based templates.  The fix is being tracked by ticket CNSSNG-4018.


Thanks Jordan,

So what would be a  process to follow in order to configure SM color codes:

1. Send base config to SM and leave ICC mode enabled. (Color code 0)

2. Configure SM after reboot for specific color code

J.

James,

That scenario could be fulfilled by using multiple templates.

  1. Send the full base configuration initially.
  2. Send a partial configuration that only contains the color code data.  The color code value would have a single hard-coded value for this.

Unfortunately, until this is fixed you would need to have a partial template for each color code value you would need to send.  We are prioritizing a fix for this.

James,

I'm following up here to note that this issue has been fixed with the latest 1.5.0 release.