Forum Discussion

Mike_Thompson_9's avatar
Mike_Thompson_9
Icon for Nimbostratus rankNimbostratus
Jul 30, 2007

Map Virtual to Pool

I have seen a few people discussing hot to map virtuals back to a pool, but nothing diffinitive. Basically all I want to do is figure out the virtual (virtual IP) of a selected Pool. Can this be done and if so, how? From what I can tell, the only association is via the iRule. Parsing the iRule code to figure out what pool the traffic is destined to would be messy and in most cases unreliable.

 

 

Any help would be greatly appreciated!
  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    It's not as smooth as you'd probably like, but if I were working on this one, I would:

     

    - Use VirtualNode.getList to get a list of Virtual nodes.

     

    - Use VirtulNode.getDefaultPool to get a list of default pools for each of those nodes

     

    - Iterate the list for each virtual node until your pool is found.

     

     

    Not the most elegant solution, and comes at it backward from what you want, but there is no "get Virtual Node this pool is associated with" iControl API that I know of (there could be and I am unaware of it - lots of stuff out there - but I don't think so).

     

     

    Don.
  • I figured I was going to have to do something like that. Not that big of a deal, but wanted to check with the experts to be sure there was not an easier way. Again, you guys have been extremely helpfull and thanks! I will give this a go...