Forum Discussion
Cindy_127211
Nimbostratus
May 26, 2005Setting LocalLB.NodeAddress states
We would like to use the LocalLB method to LocalLB.NodeAddress get_session_status and set_session_enabled_state methods to get the status of a Node and then set the status of the node. Howeve...
Loc_Pham_101863
May 26, 2005Historic F5 Account
Cindy,
Although the mentioned methods sound similar, there are some subtle differences in how they're used.
LocalLB.NodeAddress.set_session_enabled_state
LocalLB.NodeAddress.get_session_enabled_state
The "set" method is used to enable/disable new sessions to be established for the specified node addresses. The "get" method is used to retrieve the value of the configured state that you set with the "set" method.
LocalLB.NodeAddress.get_session_status
This method is used to get the actual, reflected status of the sessions for the specified node addresses. For node addresses, the returned status will likely be either enabled (0), disabled (1), or forced disabled (2). But when you call LocalLB.PoolMember.get_session_status, the returned status also takes into consideration the status of the parent object, (for pool members, the parent objects are the node addresses), hence any of the 4 values is possibly returned.
Now, if you really want to explicitly set the status of the node addresses, or pool members yourself (i.e. bringing them UP or down rather than letting the health monitoring system do it for you), you can override it by calling either
LocalLB.NodeAddress.set_monitor_state or
LocalLB.PoolMember.set_monitor_state
You can then call the "get_monitor_status" in either NodeAddress or PoolMember interface to get the actual, reflected monitor status of the respective objects.
Hope this helps.
Loc
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
