Forum Discussion

junliangseow_26's avatar
junliangseow_26
Icon for Nimbostratus rankNimbostratus
Sep 08, 2016

Remove persistence of virtual server using f5-sdk

Hi,

Currently using f5-sdk on LTM 4200. Would like to check how I can update the persistence to "None" using f5-sdk(preferred) or the way to do it through iControl.

the current command to create is as such.

vs_payload = { 'name': vs_name,
                'destination': "%s:%s" %(dest, target_port),
                'pool': '/Common/%s' %(pool_name),
                'ipProtocol': vs_protocol,
                'sourceAddressTranslation' : {'pool': snat_name, 'type': 'snat'},
            }
mgmt.tm.ltm.virtuals.virtual.create(**vs_payload)

We can update it by doing this.

virtual = mgmt.tm.ltm.virtuals.virtual.load(name=vs_name, partition='Common')
virtual.update('persist' : 'source_addr')

But I can't get it to go back to "Persistence : None".

No RepliesBe the first to reply