Forum Discussion

merlinet_60432's avatar
merlinet_60432
Icon for Nimbostratus rankNimbostratus
Aug 11, 2011

remove_wideip_pool with pycontrol

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. [merlinet@as-jw gslb]$ ./rmwp.py No handlers could be found for logger "suds.client" Server raised fault: 'Could not find element by name: pool_name' here are part of the script: new_set = glb.wip_obj.typefactory.create('GlobalLB.WideIP.WideIPPool') new_set.pool_name = "real_www.domain.com" new_set.order = 1 new_set.ratio = 0 try: glb.wip_obj.remove_wideip_pool(wide_ips = [wideip], wideip_pools = [[new_set]]) except Exception, e: print e

 

  • I solve this problem

     

     

    like:

     

     

    new_seq = glb.wip_obj.typefactory.create('GlobalLB.WideIP.WideIPPoolSequence')

     

    new_set = glb.wip_obj.typefactory.create('GlobalLB.WideIP.WideIPPool')

     

    new_set.pool_name = "real_www.domain.com"

     

    new_set.order = long(0)

     

    new_set.ratio = long(1)

     

    new_seq.item = [new_set]

     

     

    try:

     

    glb.wip_obj.remove_wideip_pool(wide_ips = [wideip], wideip_pools = [new_seq])

     

    except Exception, e:

     

    print e

     

     

    thanks