I would like to use SoftLayer_Network_Gateway_Vlan::getObject in Python in order to check whether a VLAN is already attached to a gateway before using createObject. I have no problem to use createObject with such a piece of code:
obj = {'bypassFlag':False, 'id':None, 'networkGatewayId':module.params['gateway_id'], 'networkVlanId':module.params['vlan_id']}
try:
res = env['Network_Gateway_Vlan'].createObject(obj)
except SoftLayer.exceptions.SoftLayerAPIError as e:
module.fail_json(msg=e.faultString)
But I don't know how to write a piece of code to retrieve the list of VLANs that are already attached to a gateway :(
If somebody has a sample about using the getObject method it would be great, thanks!