Forum Discussion
Sep 14, 2007
Good points. The Initialize method basically validates that the inputs are correct format (address/port/etc) but does not actually connect to the BIG-IP to verify connectivity information (in hindsight maybe it should).
The m_interface.ConnectionInfo.isValid() call verifies that the inputs for hostname, port, username, and password are non-zero length (meaning that the initialize call was made and succeeded). Not sure how this could be returning false. I'll have to test this out.
With what you have, the easiest way to verify a connection is to put a try/catch loop around an iControl call after you make the initialize() call.
...
m_interfaces.initialize(...)
try
{
String sVersion = m_interfaces.SystemInfo.get_version();
}
catch (Exception)
{
// Invalid connection.
}
I'll look at adding the true connectivity to the assembly's intialize method but in the mean time, this should get you going. I'll also double check on the isValid() method returning false, it should not be in your case...
-Joe