Extreme API with Python

Table Of Contents
Extreme API with Python
Page | 67
Part no.9036931-00 Rev AA February 2021
# @VariableFieldLabel (description = "Multicast Enable",
# type = string,
# required = yes,
# readOnly = no,
# validValues = [yes,no],
# name = "multicast",
# value = "no"
# )
#@SectionEnd
#@SectionStart (description = "Device Specific Data")
# @VariableFieldLabel (description = "NNI Fabric Port List",
# type = string,
# required = yes,
# readOnly = no,
# name = "portlist",
# value = "1/1-1/3",
# scope = device
# )
# @VariableFieldLabel (description = "Nickname Custom",
# type = string,
# required = no,
# readOnly = no,
# name = "nicknameCustom",
# value = "",
# scope = device
# )
#@SectionEnd
#@MetaDataEnd
These variables are then accessible from the emc_vars dictionary, which uses the name as the key.
This code snippet illustrates this principle:
def main():
# you first perform some sanity checks
familyType = emc_vars["family"]
if familyType != "VSP Series":
raise RuntimeError('Error: This script needs to be executed on a VSP')