Joel_Breton
May 26, 2017Nimbostratus
Add allowed VLAN to Virtual Server - Python F5-SDK
I'm trying to set the allowed vlan on a virtual server using the Python SDK.
Here's my code
newvs = vs.virtual.create(name='myvs', destination='10.0.0.1:80')
newvs.mask = '255.255.255.255'
newvs.pool = 'mypool'
newvs.vlansDisabled = False
newvs.vlansEnabled = True
newvs.vlan = 'myvlan'
newvs.update()
The script runs successfully but the vlan is not added to the allowed vlan list.
If I add the vlan manually via the config utility and browse the API I noticed the vlan option uses square brackets [].
vlans: [ "/Common/myvlan" ]
Please advise. 🙂