Extreme API with Python
Table Of Contents
- 1 Preface
- 2 Introduction
- 3 EXOS APIs
- 4 VOSS API
- 5 XMC API
- 6 ExtremeCloud IQ API
- 7 Extreme Campus Controller API
Extreme API with Python
Page | 65
Part no.9036931-00 Rev AA February 2021
5.1.6.4 Add User-Input Variables to a Script
As of XMC 8.0.4, the metadata used with TCL can still be used as is, even if the syntax is more TCL-
centric than it is compliant with Python. Starting with XMC 8.1.2, the Metadata fields with Python
scripting have evolved so that the name field and the value field can be referenced directly.
Note: The legacy “set var name value” syntax is still supported for backward compatibility.
Script interaction must be defined between the Metadata tags.
#@MetaDataStart
…
#@MetaDataEnd
You can add a description, but the most important part is the user-input variable definition. You must
use the specific meta data shown below to define a variable that the user is prompted to set at when
the script is executed.
#@VariableFieldLabel (description = "Enter Tag Type",
# type = String,
# required = yes,
# validValues = [tag,untag],
# readOnly = no,
# name = "myVar",
# value = "42"
# )
To specify multiple variables if needed, repeat the above definition.
You can specify multiple values in the VariableFieldLabel metadata.
- description: this is displayed before the value field
- type: the data format of data.
- scope: global (default) or device specific.
- required: yes or no
- validValues: a list of possible values, inside square brackets and comma-separated
- readOnly: access privilege setting, yes or no
- name: the name of the variable
- value: the default value of the variable, which you can override
As of XMC 8.4.4, the data type is string only. In this example, you define the user-input variable fields
and their scope with a description.
#@MetaDataStart
#@DetailDescriptionStart
#################################################################################
#
# This script setups Fabric Connect for VOSS. It assumes reachabilty to each










