Forum Discussion
Hygor
Oct 17, 2017Nimbostratus
Ok, you want to remove the irule from the virtual server. Here is how you can do that:
import requests
from f5.bigip import ManagementRoot
requests.packages.urllib3.disable_warnings()
connect to your F5
b = ManagementRoot('your_f5_mgmt_ip', 'user', 'pass')
load the virtual server
vip = b.tm.ltm.virtuals.virtual.load(name='vs_name')
list irules in vs
vip.rules
[u'/Common/irule1', u'/Common/irule2']
In this case we'll remove the irule2. The irule1 will remain in the virtual server
vip.rules = ['/Common/irule1']
update the configuration
vip.update()
Hope that it helps you. Regards,
Hygor