Retrieve platform version using iControl Proxy (Java code sample)
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();
}Published Mar 07, 2015
Version 1.0CodeCentral_194
Cirrostratus
Joined May 05, 2019
CodeCentral_194
Cirrostratus
Joined May 05, 2019
No CommentsBe the first to comment
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)