For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Retrieve platform version using iControl Proxy (C# code sample)

Problem this snippet solves:

This C# client code sample uses the iControl Proxy to retrieve the platform version for each device managed by the referenced Enterprise Manager.

Code :

// Get EM iControl interface.
Interface ic = new IControlInterface(IpAddress, Port, UserName, Password);

// Get devices.
string[] deviceList = ic.ManagementEM.get_devices();

// Iterate through devices.
foreach (string deviceIp in devices)
{
    // Get new context ID for each device (i.e. 'device session' use).
    string context = ic.ManagementEM.get_context_id();

    // Use this when setting up multiple connections to the same endpoint
    // with alternating proxy context IDs.
    // ic.ConnectionInfo.setEndpoint(deviceIp, Port,
        "/iControl/iControlPortal.cgi?context_id=" + context);

    // Set device context for current device.
    ic.ManagementEM.set_device_context(deviceIp);

    // Get remote device version.
    string version = ic.SystemSystemInfo.get_version();
}
Published Mar 07, 2015
Version 1.0
No CommentsBe the first to comment