williambb_9960
Sep 28, 2009Nimbostratus
Get Node Status in Visual Basic
I've been beating my head on sharp corners for a couple of days on this issue and am deferring to the experts. I'm fairly new to VB and very new to iControl. We're running LTM 9.3.1 and I need to get a list of nodes for an LTM and their enabled status. In my code below I'm getting an error on NodeName(0) passed to get_session_enabled_state of "Value of type 'string' cannot be converted to '1-dimensional array of String'."
Any help with this? (I have to use VB - we've adopted it as a standard for all development)
Module Module1
Sub Main()
Dim objLTM As New iControl.Interfaces()
objLTM.initialize(MyLTM, MyUID, MyPassword)
Dim arrNodes() As String = objLTM.LocalLBNodeAddress.get_list
Dim NodeName(0) As String
NodeName(0) = Node
Dim NodeState = New iControl.LocalLBEnabledStatus
NodeState = objLTM.LocalLBNodeAddress.get_session_enabled_state(NodeName(0))
Console.WriteLine(Node, " --> ", NodeState)
Next
End Sub
End Module