Forum Discussion
Steve_Brown_882
Oct 13, 2009Historic F5 Account
pyControl Creating a Virtual Server
I am looking for a little help using the VirtualServer.create method in pyControl. I have tried a bunch of diffrent ways to pass everything, but I still can't get it right.
I think this is close but not wuite right.
b.LocalLB_VirtualServer.create(
definitions = [{'name' : 'my.test.vip.01', 'address' : '10.1.2.3', 'port' : 443, 'protocol' : 'PROTOCOL_TCP'}],
wildmasks = ['255.255.255.255'],
resources = [{'type' : 'RESOURCE_TYPE_POOL', 'default_pool_name' : 'default_pool_name'}],
profiles = [{'profile_context' : 'PROFILE_CONTEXT_TYPE_ALL', 'profile_name' : 'tcp'}]
)
- Steve_Brown_882Historic F5 AccountWell I figured it out. I guess all it took was posting it to the forums for me to get it right. 😄
b.LocalLB_VirtualServer.create( definitions = [{'name' : 'my.test.vip.01', 'address' : '10.1.2.3', 'port' : 443, 'protocol' : 'PROTOCOL_TCP'}], wildmasks = ['255.255.255.255'], resources = [{'type' : 'RESOURCE_TYPE_POOL', 'default_pool_name' : 'mypool'}], profiles = [[{'profile_context' : 'PROFILE_CONTEXT_TYPE_ALL', 'profile_name' : 'tcp'}]] )
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