Forum Discussion
merlinet_60432
Nimbostratus
Aug 11, 2011pycontrol, 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
Admin
Aug 12, 2011OK, idiot me...figured this out. Requires two creates, one to create the pool definition, then one to create the sequence. Gets me every time!
>>> pooldef = wip.typefactory.create('GlobalLB.WideIP.WideIPPool')
>>> pooldef.pool_name = 'gpool1'
>>> pooldef.order = 0
>>> pooldef.ratio = 1
>>> pooldef_seq = wip.typefactory.create('GlobalLB.WideIP.WideIPPoolSequence')
>>> pooldef_seq.item = [pooldef]
>>> wip.add_wideip_pool(wide_ips = ['test.wip.com'], wideip_pools = [pooldef_seq])
>>> wip.get_wideip_pool(wide_ips = ['test.wip.com'])
[[(GlobalLB.WideIP.WideIPPool){
pool_name = "gpool1"
order = 0
ratio = 1
}, (GlobalLB.WideIP.WideIPPool){
pool_name = "gpool2"
order = 1
ratio = 2
}]]
>>> wip.remove_wideip_pool(wide_ips = ['test.wip.com'], wideip_pools = [pooldef_seq])
>>> wip.get_wideip_pool(wide_ips = ['test.wip.com'])
[[(GlobalLB.WideIP.WideIPPool){
pool_name = "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