Forum Discussion
Feb 16, 2021
your 'vlansEnabled' receives a boolean as value. Booleans aren't strings.
So instead of:
'vlansEnabled': 'True',
Try:
'vlansEnabled': True,
There maybe other errors, so use this as a reference to make sure the values match the expected type:
params = {'name': vs_name,
'destination': '{}:{}'.format('192.168.100.10', str(80)),
'mask': '255.255.255.255',
'description': 'Created by Python',
'pool': my_pool,
'profiles': profiles,
'partition': 'Common',
'sourceAddressTranslation': {'type': 'automap'},
'vlansEnabled': True,
'vlans': ['/Common/internal']
}
ltm.virtuals.virtual.create(**params)
Cheers.
Rodrigo