Forum Discussion
Omachonu_Ogali1
Dec 20, 2006Historic F5 Account
Can't disable a pool member via PHP/SOAP+WSDL
I'm trying to disable a pool member, but not having any luck. I've called both the set_monitor_state() and set_session_enabled_state() functions, but the member is never disabled.
Is there a...
Omachonu_Ogali1
Dec 22, 2006Historic F5 Account
I did some more testing, and even renamed my 1-D array keys to incorrect names (i.e. NOT member and monitor_state), and it still accepted the parameters without throwing an exception. It refuses a 2-D array, so I ended up creating a class and referencing that as an object. Now, it works flawlessly...
class memberMonitorState {
var $member;
var $monitor_state;
function __construct($member, $monitor_state) {
$this->member = $member;
$this->monitor_state = $monitor_state;
}
}
...
case 'disable':
if ($obj->enabled_status == ENABLED_STATUS_DISABLED) {
printf("%s:%d is already disabled in pool %s\n", $member->address, $member->port, $current_pool);
} else {
printf("disabling %s:%d in pool %s\n", $member->address, $member->port, $current_pool);
$session_disabled[0][0] = new MemberSessionState($member, STATE_DISABLED);
$pm_ctrl->set_session_enabled_state(array($current_pool), $session_disabled);
}
break;
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects