Forum Discussion
ubermunch_12823
Nimbostratus
Oct 15, 2004set_availability
BIG-IP Kernel 4.6.1 Build18
I'm using the method below to set the availability(connections) of a node. It works fine for disabling connections, but when I try to enable connections I get the following exception.
An unhandled exception of type 'System.Web.Services.Protocols.SoapHeaderException' occurred in system.web.services.dll
Additional information: ITCMCommon::InvalidArgument Exception caught on ITCMLocalLB::Node::set_availability()!
I use a similar method for switching state (sessions) and that works for both enable and disable. I can see the value of state being passed into the set_availability soap method and it's coming through as 0, which should work. Anybody have a solution for enabling connections?
Sub setAvailability(ByVal sHost As String, _
ByVal sPwd As String, _
ByVal sUser As String, _
ByVal sNodeAddress As String, _
ByVal sNodePort As String, _
ByVal intSwitch As Integer _
)
Dim state As Integer
Dim node_defs(0) As Node.ITCMCommonIPPortDefinition
objNode.Url = "https://" & sHost & " /iControl/iControlPortal.cgi"
objNode.PreAuthenticate = True
creds.UserName = sUser
creds.Password = sPwd
objNode.Credentials = creds
node_defs(0) = New Node.ITCMCommonIPPortDefinition
node_defs(0).address = sNodeAddress
node_defs(0).port = CLng(sNodePort)
If intSwitch = 1 Then
state = 1
Else
state = 0
End If
objNode.set_availability(node_defs, state)
End Sub
- You've found a difference in the enums for AvailabilityState and EnabledState.
enum EnabledState { STATE_DISABLED = 0, // The object is disabled. STATE_ENABLED = 1 // The object is enabled. }; void ITCMLocalLB::Node::set_state( in IPPortDefinition[] node_defs, in EnabledState state );
enum AvailabilityState { AVAILABILITY_UNCHECKED = 0, // The node has not been checked for availability. AVAILABILITY_DOWN = 1, // The node is not available. AVAILABILITY_UP = 2, // The node is available. AVAILABILITY_CHECKING = 3, // The node is currently being checked for availability. AVAILABILITY_FORCED_DOWN = 4, // The node has been forced down manually. AVAILABILITY_ADDR_DOWN = 5, // The node address for a node server is down. AVAILABILITY_UNKNOWN = 6, // An unknown, undecipherable state has been received for the node. AVAILABILITY_MAINT = 7, // Maintenance mode. AVAILABILITY_ENABLED = 8, // The node is enabled. AVAILABILITY_DISABLED = 9, // The node is disabled. AVAILABILITY_ADDR_DISABLED = 10, // The node address is disabled. AVAILABILITY_PORT_DISABLED = 11 // The node service is disabled. }; // Sets the availability state for the specified nodes. //Only AVAILABILITY_UP and AVAILABILITY_DOWN should be set. void ITCMLocalLB::Node::set_availability( in IPPortDefinition[] node_defs, in AvailabilityState state );
If intSwitch = 1 Then state = 2 ' AVAILABILITY_UP Else state = 1 ' AVAILABILITY_DOWN End If objNode.set_availability(node_defs, state)
- ubermunch_12823
Nimbostratus
Doh... - No problem! I appreciate you posting your version and sample code on the first post. Usually it takes one or to go-arounds to get the information needed to assess the problems.
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