cancel
Showing results for 
Search instead for 
Did you mean: 

Problem this snippet solves:

This Java 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.
    iControl.Interfaces ic = new iControl.Interfaces();
    ic.initialize(ipAddress, port, userName, password);

    // Get devices.
    String[] deviceList = iControl.ManagementEM.get_devices();

    // Iterate through devices.
    for (int i=0; i < deviceList.length; i++)
    {
        // Get new context ID for each device (i.e. 'device session' use).
        String context = iControl.ManagementEM.get_context_id();

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

        // Set device context for current device.
        iControl.ManagementEM.set_device_context(deviceList[i]);

        // Get remote device version.
        String version = iControl.SystemSystemInfo.get_version();
    }
Version history
Last update:
‎07-Mar-2015 15:58
Updated by:
Contributors