Joe,
Correct. I want to optimize it and make it a little more flexible. This also seemed like a good example to learn about how to get data for just one WIP/VS/Pool.
In the long run I want to be able to take my WideIP, show what Pool it goes to and show the ratio between DataCenters.
What I am trying to improve I think is as follows:
1) Put in the WIP and get the pool it points to (right now I know what pool is used for the WIP so I hard coded it to just look at the pool)
2) Get the GTM/LTM pool directly instead of getting all pools and iterating through them to find just the one I want to look at
3) Find out how to access the 'Server Name' and 'Data Center' values that I see in the GTM for the GTM Pool (this is on 10.2)
So although a working example would be great I think I can put something together if I can just figure out which functions I should use for the above or if I can even get back the values easily.
I am thinking eventually I would look for output something like this (assume I send it the WIP mytest.com)
WIP: mytest.com
--> GTM Pool: pool_mytest
--->DataCenter1 - Ratio X
-----> LTM Virtual Server: vip_web_mytest
---------> LTM Pool: ltm_pool_mytest
--> DataCenter2 - Ratio Y
----> LTM Virtual Server: vip_web_mytest
---------> LTM Pool: ltm_pool_mytest
I hope that makes more sense.
Thanks
Jason