importPackage(java.lang);
importPackage(java.util);
importPackage(com.cloupia.lib.util.managedreports);

function getReport(reportContext, reportName)
{
	var report = null;
	try {
		report = ctxt.getAPI().getConfigTableReport(reportContext, reportName);
	} catch(e)
	{
	}

	if (report == null) {
		return ctxt.getAPI().getTabularReport(reportName, reportContext);
	} else {
		var source = report.getSourceReport();
		return ctxt.getAPI().getTabularReport(source, reportContext);
	}
}
 
function getReportView(reportContext, reportName)
{
    var report = getReport(reportContext, reportName);
 
    if (report == null) {
        logger.addError("No such report exists for the specified context "+reportName);
		return null;
    }
 
    return new TableView(report);
}

// following are only sample values and need to be modified based on actual UCSM account name
var ucsmAccountName = ctxt.getInput("UCS Account");

// report name is obtained from Report Meta data and no need to change unless you need to access a different report
var reportName = "INFRA_COMPUTING_CONFIG_VLAN";
 
var repContext = util.createContext("ucsm", null, ucsmAccountName);
var report = getReportView(repContext, reportName);
 
var manifest = "";
//report.columnHide("ID", true);
//report.columnRename("ID", "ID1")
for (var i=0; i

Additional Links: