Regarding gtm and ltm pools and members, how does one request "all" from iControl rest api, rather than having to request each pool/member/virtual?
With tmsh, this is possible - tmsh show gtm wideip A all detail.
I'm trying to build a view of wideip pools, listing each virtual server, and then listing each virtual server's members, with statuses at each level.
With iControl, it seems one must iterate through wideips -> pools -> members -> virtual servers -> pools -> members.
With tmsh text output, I built a script in a couple of hours to show this report.
With iControl, it's a significant programming project to re-assemble the data, and it will never be useful because you can't pull the data fast enough.
It took about 30 minutes to execute the hundreds of requests needed just to drill down to the vips.
It's not feasible to use this method.
How does one request 'all' from iControl, while using a limited user with only GET request permissions (no util/bash)?
First off, use the iCR python module and secondly, retrieve pools with expandSubCollections set which will retrieve the pool member data. See below an example script to copy pools from one device to another.:
from iCR import iCR
s = iCR("172.24.9.132","admin","admin")
t = iCR("10.128.1.245","admin","admin")
pools = s.get("ltm/pool?expandSubcollections=true")['items']
for pool in pools:
# Remove stat and session from membersReference => items
for member in pool['membersReference']['items']:
# POST to the target device
print "Created " + pool['name']
print "Error creating " + pool['name']
Thanks, expandSubcollections=true helped a lot.
That brings it down to 3 requests per datacenter.
By interleaving these 3 json sets, then combining that with DNS lookups and asset management db queries, I was able to build an overall view of gtm pools, Virtual Server members, and VS member nodes with VS member up/down statuses.
Great to hear it. Keep up the good work.