Forum Discussion

Vaccano_328474's avatar
Vaccano_328474
Icon for Nimbostratus rankNimbostratus
Aug 28, 2017

Get Virtual Server from Pool (using iControlRest)

I have an automated process that cleans up unused pools. But it fails when the pool is attached to an existing Virtual Server.

 

I see that I can get the pool from a Virtual Server (via the "pool" property), but I don't see a way to get the Virtual Server name from the Pool.

 

If there is no way to do this, I can just try to delete it, and then parse the name of the Virtual Server out of the error message. But it would be much nicer to not have to fail as part of normal operations.

 

Is there a way to get the Virtual Server that is using a pool with only the pool's information? (Using iControlRest)

 

1 Reply

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    I don't know of any way to get that info from the pool itself.

     

    You would have to get the info for all the VS's and check each one to see if it had the pool you want to delete as the default pool... Or clone pool... or wan mentioned in an iRule or local traffic policy..

     

    Maybe parsing that response will be easier :)