Forum Discussion
comparing variable values
Michael has it pretty much correct but each time you make a call it doesn't make a separate auth calls. The Initialize-F5.iControl essentially creates an internal iControl.Interfaces object that can be retrieved with the Get-F5.iControl cmdlet. When you call Initialize-F5.iControl it makes a call to the BIG-IP's system information interface just to check that the credentials will work. Then when you access any of the interface members of the Interfaces object (returned from Get-F5.iControl), a separate auth call isn't made. It just uses the credentials you originally supplied and adds Authentication headers to all method call requests. iControl is stateless in that each call you make will establish a new HTTPS connection to the BIG-IP and request the URL for the given method. I believe I set the PreAuthenticate header on the .Net connection object so that it would pass the credentials on the first pass without requiring retries.
If you wish to manage multiple systems, you can create individual interfaces objects, initialize each once, and then use them for your different devices. Essentially it's just a object storing the server IP and client credentials.
You can do something like this for multiple systems if you don't want to have to keep calling Initialize-F5.iControl back and forth
$bigip1 = New-Object iControl.Interfaces
$bigip1.initialize("address1", 443, "username1", "password1")
$bigip2 = New-Object iControl.Interfaces
$bigip2.initialize("address2", 443, "username2", "password2")
...
$sysinfo1 = $bigip1.SystemSystemInfo.get_system_information()
$sysinfo2 = $bigip2.SystemSystemInfo.get_system_information()
Hope this helps...
-Joe
- Jul 21, 2010Did you compile the WSDL yourself and incorporate it into your application? If so, I'd recommend going with the iControl Assembly. Just plug the .Net assembly into your project and you don't have to muck around with all the lower level bindings. You can find that download in the iControl Assembly Labs project under the Download menu.
- lisanwan_54895Jul 22, 2010
Nimbostratus
Posted By Joe on 07/21/2010 12:01 PM - lisanwan_54895Jul 23, 2010
Nimbostratus
Thanks to everyone who had read my topic. - Jul 23, 2010You still shouldn't have to be defining the classes yourself. The SDK is a bit out of date with regards to the .Net samples. For future development, we have provided a .Net assembly with all the iControl interfaces and objects bundled up for you. Go to the Download.Labs page and select the iControl Assembly. By clicking on the "Discussions and Downloads" link you can get the iControl Assembly for .Net. In your VS.Net project, just select "Add Reference" and point it to the downloaded iControl.dll and you can access all the iControl interfaces and methods from a newly instantiated iControl.Interfaces object. The code looks something like this
iControl.Interfaces interfaces = new iControl.Interfaces(); interfaces.initialize("bigip_addr", "username", "password"); string [] vip_list = interfaces.LocalLBVirtualServer.get_list();
- lisanwan_54895Jul 24, 2010
Nimbostratus
Thank you, Joe