I am still working on my script to copy an SSID between networks and change an SSID. But now I struggle with the implementation of the API. Problem: I use getNetworkWirelessSsid to read the SSID and write the SSID with updateNetworkWirelessSsid. But the API call getNetworkWirelessSsid gives me the following result for my test-SSID: {'authMode': '8021x-radius',
'availabilityTags': [],
'availableOnAllAps': True,
'bandSelection': 'Dual band operation',
'defaultVlanId': 999,
'dot11r': {'adaptive': False, 'enabled': False},
'dot11w': {'enabled': True, 'required': True},
'enabled': True,
'encryptionMode': 'wpa-eap',
...
'wpaEncryptionMode': 'WPA2 only'} The Schema Definition for updateNetworkWirelessSsid has some restrictions that make this invalid, and I can't write it back. For example, this SSID uses DOT1X authentication, but I get the element "encryptionMode" returned, which is only valid for PSK SSIDs. There are a couple of more restrictions where elements are dependent on each other. How do I handle this (and I will never understand why this invalid element is returned)? I can only think of having if-conditions where I match each restriction and remove the element if this element is not allowed on this SSID: if source_ssid["authMode"] == '8021x-radius':
source_ssid.pop('encryptionMode') But this is an extremely dirty workaround, and I need an individual function for each object I want to copy. Or is there a "switch" or "parameter" to tell the system to ignore everything that is not valid? At least I didn't find anything like this. Any idea or advice?
... View more