Forum Discussion
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
}]]
>>>