lets
2 TopicsTrying to create VIPs via Python and get an error
Here is the snippet of code that is used to create the VIPs on the f5; rv0=revisedServer.replace("dev_","test_vip_") print (eachServer[0][3].upper()) rv1=eachServer[0][3].upper() params = {'name': rv0, 'source': "0.0.0.0/0", 'description': "TEST VS",'protocol': rv1,'pool': revisedServer,'profiles': profiles,'partition': 'Common','sourceAddressTranslation': {'type': 'snat'},'vlansEnabled': 'True','vlans': ['/Common/Dev'],'arp':'disabled','icmpecho':'disabled','state':'disabled','port':eachServer[0][1],'tagMode':'none'} print (params) #LETS CREATE VIRTIUAL SERVERS IF THE SERVER ALREADY EXISTS KEEP IT MOVING try: ltm.virtuals.virtual.create(**params) except Exception as e: print (e) When run I get the following error: 400 Unexpected Error: Bad Request for uri: https://pltbigip01.pexdev.corp:443/mgmt/tm/ltm/virtual/ Text: '{"code":400,"message":"Instance contains a string","errorStack":[],"apiError":1}' Does anyone know why?488Views0likes4CommentsTrying to create VIPs via Python and get an error
Here is the snippet of code that is used to create the VIPs on the f5; rv0=revisedServer.replace("dev_","test_vip_") print (eachServer[0][3].upper()) rv1=eachServer[0][3].upper() params = {'name': rv0, 'source': "0.0.0.0/0", 'description': "TEST VS",'protocol': rv1,'pool': revisedServer,'profiles': profiles,'partition': 'Common','sourceAddressTranslation': {'type': 'snat'},'vlansEnabled': 'True','vlans': ['/Common/Dev'],'arp':'disabled','icmpecho':'disabled','state':'disabled','port':eachServer[0][1],'tagMode':'none'} print (params) #LETS CREATE VIRTIUAL SERVERS IF THE SERVER ALREADY EXISTS KEEP IT MOVING try: ltm.virtuals.virtual.create(**params) except Exception as e: print (e) When run I get the following error: 400 Unexpected Error: Bad Request for uri: https://pltbigip01.pexdev.corp:443/mgmt/tm/ltm/virtual/ Text: '{"code":400,"message":"Instance contains a string","errorStack":[],"apiError":1}' Does anyone know why?352Views0likes2Comments