Luke_
Oct 08, 2010Nimbostratus
Getting Virtual Servers from a Pool Member on a GTM
Hi All,
I'm trying to get a list of Wide IPs, then from there get the Pools associated with each Wide IP, and then from there get the Virtual Servers and Servers associated with each pool on a GTM.
Currently I am able to get the Wide IPs, then from there get the Pools and get the PoolMembers (using the PoolMember WSDL) for each pool.
I'm having issues getting the Virtual Servers that each pool member relates to. From reading the API it looks like calling PoolMember->get_dependency should return these, but it's returning no dependencies.
I'm using PHP with nusoap, and the code I'm using is:
$poolMembers = $poolClient->call('get_member', array('pool_names' => array($poolName)), 'urn:iControl:GlobalLB/Pool');
foreach ($poolMembers[0] as $poolMember) {
$memberDependencies = $poolMemberClient->call('get_dependency', array('pool_names' => array($poolName), 'members' => array(array(array('address' => $poolMember['member']['address'], 'port' => $poolMember['member']['port'])))), 'urn:iControl:GlobalLB/PoolMember');
print_r($member_Dependencies);
}
The output I get is
Array
(
[0] => Array
(
[0] => Array
(
[member] => Array
(
[address] => 1.1.1.1
[port] => 80
)
[dependencies] => Array
(
)
)
)
)
What am I doing wrong? Is there a way to work out the Virtual Server given a PoolMember on the GTMs? Or do you have to go the other way around (get all Virtual Servers first and then work out which pools they belong to)?
Any help much appreciated