Forum Discussion
MarkM_63051
Nov 29, 2011Nimbostratus
delete_pool not working
Hello,
I am attempting to create and delete a pool programatically. I had no problem with the create method but the delete_pool method does not seem to do anything. I can check the F5 GUI an...
MarkM_63051
Nov 30, 2011Nimbostratus
Excuse my ignorance, but I have only been working with an F5 now for a total of about 6 days. I use the following code to create the pool in the first place. I am setting a LocalLBMethod and a LocalLBMonitorRule. Do I need to somehow unlink/delete them first?
// The following line is how you create an empty pool without members.
iControl.CommonIPPortDefinition[][] member =
new iControl.CommonIPPortDefinition[1][0];
iControl.LocalLBLBMethod lb_method =
iControl.LocalLBLBMethod.LB_METHOD_ROUND_ROBIN;
iControl.LocalLBLBMethod[] lbMethods = new iControl.LocalLBLBMethod[]{lb_method};
lblpool.create(new String[]{poolName}, lbMethods, member);
// Now set a default monitor association
iControl.LocalLBMonitorRule monitorRule = new iControl.LocalLBMonitorRule();
monitorRule.setMonitor_templates(new String[]{"gateway_icmp"});
monitorRule.setType(LocalLBMonitorRuleType.MONITOR_RULE_TYPE_SINGLE);
iControl.LocalLBPoolMonitorAssociation monitorAssociation =
new iControl.LocalLBPoolMonitorAssociation();
monitorAssociation.setPool_name(poolName);
monitorAssociation.setMonitor_rule(monitorRule);
iControl.LocalLBPoolMonitorAssociation[] monitorAssociations =
new iControl.LocalLBPoolMonitorAssociation[]{monitorAssociation};
lblpool.set_monitor_association(monitorAssociations);
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