Forum Discussion
merlinet_60432
Aug 11, 2011Nimbostratus
pycontrol, remove_wideip_pool() problem
Hello,
I'm using pycontrol v2 to control GTM WideIP. I'm trying to remove WIDEIP POOL with remove_wideip_pool()
When I run the python script, below error has been occured.
...
JRahm
Aug 12, 2011Admin
Remove the double brackets surrounding the new_set object and you should be good to go.
>>> wip = b.GlobalLB.WideIP
>>> pl = b.GlobalLB.Pool
>>> wip.get_list()
[/Common/test.wip.com]
>>> wip.get_wideip_pool(wide_ips = ['/Common/test.wip.com'])
[[(GlobalLB.WideIP.WideIPPool){
pool_name = "/Common/gpool1"
order = 0
ratio = 1
}, (GlobalLB.WideIP.WideIPPool){
pool_name = "/Common/gpool2"
order = 1
ratio = 2
}]]
>>> pooldef = wip.typefactory.create('GlobalLB.WideIP.WideIPPool')
>>> pooldef.pool_name = '/Common/gpool2'
>>> pooldef.order = 1
>>> pooldef.ratio = 2
>>> wip.remove_wideip_pool(wide_ips = ['/Common/test.wip.com'], wideip_pools = pooldef)
>>> wip.get_wideip_pool(wide_ips = ['/Common/test.wip.com'])
[[(GlobalLB.WideIP.WideIPPool){
pool_name = "/Common/gpool1"
order = 0
ratio = 1
}, (GlobalLB.WideIP.WideIPPool){
pool_name = "/Common/gpool2"
order = 1
ratio = 2
}]]
>>>
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