in Python:
when Radius is enabled on SSID the result dict will have a key "radiusServers" which will contain a list of dicts, for every radius server, however, if the SSID does not have Radius active then the key will not exist and you can't address it via [""].
Use dict get() method to check if the key exists.
{'authMode': '8021x-radius',
'availabilityTags': [],
'availableOnAllAps': True,
'bandSelection': 'Dual band operation with Band Steering',
'concentratorNetworkId': 'N_111111111111111111',
'dot11r': {'adaptive': False, 'enabled': False},
'dot11w': {'enabled': True, 'required': False},
'enabled': True,
'encryptionMode': 'wpa-eap',
'ipAssignmentMode': 'VPN',
'mandatoryDhcpEnabled': True,
'minBitrate': 12,
'name': 'thisismyssidname',
'number': 2,
'perClientBandwidthLimitDown': 0,
'perClientBandwidthLimitUp': 0,
'perSsidBandwidthLimitDown': 0,
'perSsidBandwidthLimitUp': 0,
'radiusAccountingEnabled': False,
'radiusAttributeForGroupPolicies': 'Filter-Id',
'radiusAuthenticationNasId': '$NODE_MAC$:$VAP_NUM$', #this seems to be future settings in MR28
'radiusCalledStationId': '$NODE_MAC$:$VAP_NAME$', #this seems to be future settings in MR28
'radiusCoaEnabled': True,
'radiusFailoverPolicy': None,
'radiusLoadBalancingPolicy': None,
'radiusOverride': False,
'radiusProxyEnabled': False,
'radiusServers': [{'host': '10.10.10.10',
'id': 111111111111111111,
'port': 1812},
{'host': '11.11.11.11',
'id': 222222222222222222,
'port': 1812}],
'radiusTestingEnabled': False,
'splashPage': 'None',
'ssidAdminAccessible': False,
'visible': True,
'vlanId': 888,
'wpaEncryptionMode': 'WPA1 and WPA2'}
ssids = dashboard.wireless.getNetworkWirelessSsids(networkId)
for ssid in ssids:
radius_server_list = []
if ssid.get("radiusServers"): #Only execute if radiusServers key exists
for server in ssid.get("radiusServers"):
radius_server_list.append(server["host"])
print(radius_server_list)