Forum Discussion
iloveniu_38329
Nimbostratus
Dec 21, 2009iControl.Interfaces.initialize() always return true
hi,everybody
in my application,i used the interface intialize()
bool m_bIsInitialized = m_interfaceF5.initialize(ip, port, username, password);
any string to be given,the return value is always true?
why?
thanks for your reply!
3 Replies
- which toolkit are you using? The .NET assembly or the Java library? The .NET Assembly by default makes a call to System.SystemInfo.get_version() and if that fails it returns false and stores the exception in the LastException member. Otherwise it returns true.
For Java, the initialize method will, as you said, always return true if you pass in all the parameters. I guess I should change that to test the interfaces as well. I'll go ahead and update the Java library that I just put out for v10.1 with code to make a test call.
Thanks for the feedback, I wrote the Java library classes a long time ago and no one has posted this yet. I'll get it coded and reply to this thread when I'm done.
-Joe - iloveniu_38329
Nimbostratus
I use .net library.
i use get_time() by myself to get the correct result.
when ip address, username and password is null,the interface initialize() return true yet.
this is my code:
ip.Trim();
username.Trim();
password.Trim();
m_bIsInitialized = m_interfaceF5.initialize(ip, username, password);
try
{
iControl.CommonTimeStamp TimeStamp = m_interfaceF5.SystemSystemInfo.get_time();
}
catch (Exception ex)
{
m_bIsInitialized = false;
}
return m_bIsInitialized; - iloveniu_38329
Nimbostratus
now, i get the result by this way.
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
