Forum Discussion
schmal_19533
Nimbostratus
Jul 13, 2010Pycontrol issue with setting default pool in virtual server
Hi,
I am quite new with the pycontrol (seems to be very useful tool) and now I am trying to set a default pool in virtual server that I have created.
In order to do that I did the following:
>>> v=b.LocalLB.VirtualServer
>>> p=b.LocalLB.Pool
>>> p.get_list()
[DGW_VIP_1, test, DGW_VIP_2]
>>> v.get_list()
[Alow_Routes, test]
>>> v.get_default_pool_name(virtual_servers='test')
[]
>>> v.set_default_pool_name(virtual_servers='test', default_pools='test')
>>> v.get_default_pool_name(virtual_servers='test')
[]
Where am I getting wrong with that?
Thanks Daniel.
- L4L7_53191
Nimbostratus
Hi Daniel sorry you haven't gotten a response yet. Anyhow, the issue is that you need to pass a list to your call, even if it has a single element. So wrap your argument of 'test' in square brackets to make it a python list and the call will work. - L4L7_53191
Nimbostratus
Hi Daniel sorry you haven't gotten a response yet. Anyhow, the issue is that you need to pass a list to your call, even if it has a single element. So wrap your argument of 'test' in square brackets to make it a python list and the call will work. - L4L7_53191
Nimbostratus
Hi Daniel sorry you haven't gotten a response yet. Anyhow, the issue is that you need to pass a list to your call, even if it has a single element. So wrap your argument of 'test' in square brackets to make it a python list and the call will work.
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