Forum Discussion
Kurt_Kite_11866
Nimbostratus
Jan 20, 2017Python SDK Assign iRules to a virtual server
Hi,
I am able to create a virtual using the F5 python SDK including the assignment of HTTP, OneConnect, Client SSL Profiles, and Server SSL profiles. However, I have not been able to figure out ...
JRahm
Admin
Jan 23, 2017Hi Kurt, The rules are a list, so you would do it this way:
>>> vip = b.tm.ltm.virtuals.virtual.load(name='testvip')
>>>vip.rules
[u'/Common/tcptest']
>>> vip.rules = ['/Common/tcptest', '/Common/platform_info']
>>> vip.update()
>>vip.rules
[u'/Common/tcptest', u'/Common/platform_info']
I did an absolute update on the rules attribute, but I could have also just appended with:
vip.rules.append('/Common/platform_info') Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects