Aruba Central Online Help

Managing Variable Files

Aruba Central allows you to configure multiple devices in bulk using templates. However, in some cases, the configuration parameters may vary per device. To address this, Aruba Central identifies some customizable CLI parameters as variables and allows you to modify the definitions for these variables as per your requirements.

You can download a sample file with variables for a template group or for the devices deployed in a template group, update the variable definitions, upload the file with the customized definitions, and apply these configuration changes in bulk.

Important Points to Note

  • Variables are associated to a device and not to a group. If you move a device between groups, variables remain with the device.
  • Variables are displayed as part of the group to which the device belongs. After you upload the variables for a device, the association would stay in the system even if the device is moved to a UI group or template group.
  • If the device is part of a UI group, variables are unused and not displayed in the UI. Aruba Central ignores the variables.
  • If the device is moved to a template group, variables are displayed in the UI and used for configuration purposes.

Downloading a Sample Variables File

The sample variables file includes a set of sample variables that the users can customize. You can download the sample variables file in the JSONJavaScript Object Notation. JSON is an open-standard, language-independent, lightweight data-interchange format used to transmit data objects consisting of attribute–value pairs. JSON uses a "self-describing" text format that is easy for humans to read and write, and that can be used as a data format by any programming language. or CSVComma-Separated Values. A file format that stores tabular data in the plain text format separated by commas. format.

To download a sample variables file:

  1. In the Network Operations app, set the filter to one of the template group under Groups.
  2. Under Manage, click Devices > Switches.
  3. Click the Config icon.
  4. Click Variables.
  5. Select one of the following formats to download the sample variables file:
    • JSON—shows the file in JSON format.
    • CSV—Shows the variables in different columns.
  6. Click Download Sample Variables File. The sample variables file is saved to your local directory.

Modifying a Variable File

The CSV file includes the following columns for which the variable definitions are mandatory:

Predefined Variables for Aruba Switches

The system defined variables in the sample variables files are indicated with sys prefix.

Table 1 lists the predefined variables for switches.

Table 1: Predefined Variables Example

Variable Name  

Description

Variable Value

_sys_gateway

Populates gateway IP address.

10.22.159.1

_sys_hostname

Maintains unique host name.

HP-2920-48G-POEP

_sys_ip_address

Indicates the IP address of the device.

10.22.159.201

_sys_module_command

Populates module lines.

module 1 type j9729a

_sys_netmask

Netmask of the device.

255.255.255.0

_sys_oobm_command

Represents Out of BandBand refers to a specified range of frequencies of electromagnetic radiation. Management (OOBM) block.

oobm

                                 ip address dhcp-bootp

                         exit

_sys_snmpv3_engineid

Populates engine ID.

00:00:00:0b:00:00:5c:b9:01:22:4c:00

_sys_stack_command

Represents stack block.

stacking

member 1 type "J9729A" mac-address 5cb901-224c00

exit

_sys_template_header

Represents the first two lines of the configuration file. Ensure that this variable is the first line in the template.

; J9729A Configuration Editor; Created on release #WB.16.03.0003+

; Ver #0f:3f.f3.b8.ee.34.79.3c.29.eb.9f.fc.f3.ff.37.ef:91

_sys_use_dhcp

Indicates DHCPDynamic Host Configuration Protocol. A network protocol that enables a server to automatically assign an IP address to an IP-enabled device from a defined range of numbers configured for a given network.  status (true or false) of VLANVirtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. 1

0

_sys_vlan_1_untag_command

Indicates untagged ports of VLAN 1

1-28,A1-A2

_sys_vlan_1_tag_command

Indicates tagged ports of VLAN 1

28-48

The _sys_template_header_ and _sys_snmpv3 engineid are mandatory variables that must have the values populated, irrespective of their use in the template. If there is no value set for these variables, Aruba Central re-imports the values for these mandatory variables when it processes the running configuration of the device.

Predefined Variables for APs

For APs, the sample variables file includes the _sys_allowed_ap variable for which you can specify a value to allow new APs to join the Instant AP cluster.

Conditions

The following conditions apply to the variable files:

  • The variable names must be on the left side of condition and its value must be defined on the right side. For example, %if var=100% is supported and %if 100=var% is not supported.
  • The < or <= or > or >= operators should have only numeric integer value on the right side. The variables used in these 4 operations are compared as integer after flooring. For example, if any float value is set as %if dpi_value > 2.8%, it is converted as %if dpi_value > 2 for comparison.
  • The variable names should not include white space, and the & and % special characters. The variable names must match regular expression [a-zA-Z0-9_]. If the variables values with % are defined, ensure that the variable is surrounded by space. For example, wlan ssid-profile %ssid_name%.
  • The first character of the variable name must be an alphabet. Numeric values are not accepted.
  • The values defined for the variable must not include spaces. If quotes are required, they must be included as part of the variable value. For example, if the intended variable name is wlan ssid-profile "emp ssid”, then the recommended format for the syntax is "wlan ssid-profile %ssid_name%” and variable as “ssid_name”: "\"emp ssid\"".
  • If the configuration text has the percentage sign % in it—for example, "url "/portal/scope.cust-5001098/Splash%20Profile%201/capture"Aruba Central treats it as a variable when you save the template. To allow the use of percentage % as an escape character, use \" in the variable definition as shown in the following example:

    Template text

    Variable

    "url": "\"/portal/scope.cust-5001098/Splash%20Profile%201/capture\""
  • Aruba Central supports adding multiple lines of variables in Instant AP configuration templates. If you want to add multiple lines of variables, you must add the HAS_MULTILINE_VARIABLE directive at the beginning of the template.

    Example

    #define HAS_MULTILINE_VARIABLE 1 %if allowed_aps% %allowed_aps% %endif%

    Variable

    “allowed_aps”: “allowed-ap 24:de:c6:cb:76:4e\n allowed-ap ac:a3:1e:c5:db:d8\n allowed-ap 84:d4:7e:c4:8f:2c"

For Instant APs, you can configure a variable file with a set of values defined for a master AP in the network. When the variable file is uploaded, the configuration changes are applied to all Instant AP devices in the cluster.

Uploading a Variable File

To upload a variable file, complete the following steps:

While uploading the variables file to Aruba Central in the CSV format, make sure to choose the default language in Microsoft Excel as English (United States).

  1. Ensure that the _sys_serial and _sys_lan_mac variables are defined with the serial number and MAC address of the devices, respectively.
  2. In the Network Operations app, set the filter to one of the template groups under Groups.
  3. Under Manage, click Devices > Switches.
  4. Click the Config icon.
  5. Click Variables.
  6. Click Upload Variables File and select the variable file to upload.
  7. Click Open. The contents of the variable file is displayed in the Variables table.
  8. To search for a variable, specify a search term and click Search icon.
  9. To download variable file with device-specific definitions, click the download icon in the Variables table.

Modifying Variables

To modify variables without downloading a variable file, modifying the variable file, and uploading the customized variable file:

  1. In the Network Operations app, set the filter to one of the template groups under Groups.
  2. Under Manage, click Devices > Switches.
  3. Click the Config icon.
  4. Click Variables.
  5. Select a device and variable.
  6. Modify the value and click Add to Modifications.
  7. Click Save.

Alternatively, to modify a single variable without downloading a variable file, modifying the variable file, and uploading the customized variable file:

  1. In the Network Operations app, set the filter to one of the template groups under Groups.
  2. Under Manage, click Devices > Switches.
  3. Click the Config icon.
  4. Hover over a desired variable and click Edit.
  5. Modify the value and click Save.
  6. Click Save.