Perl API Reference Guide for Cisco License Manager
Chapter 12: Report Management Functions

Table Of Contents

Report Management Functions

generate_report

read_report


Report Management Functions


This chapter provides information about the following report management functions:

generate_report

read_report

generate_report

Synopsis

generate_report ($token, $subject, $filter) 

Description

This function generates the specified report and stores the report data at the server. If prior report data exists, a call to this function overwrites the previous report. Only one copy of the report data is stored. This function may take a long time to perform. Only one report can be generated at a time.

Input Parameters

Parameter
Type
Value
Description

token

UserToken, mandatory

A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server. Only an administrator can generate a report.

subject

ReportSubject, mandatory

RMA_DISCREPANCY, LIC_DISCREPANCY, REDEPLOYABLE_LICENSE, DEVICE_SUMMARY, UNUSED_LICENSE, AUDITTRAIL

Enumeration value that represents the subject of the report to be generated.

filter

DeviceFilter, mandatory

The input DeviceFilter object specifies the criteria for searching the defined devices. If the filter is set to null, no filtering will be performed. For an audit trail, null should be entered.


Return

This function returns a Cisco::CLM::Common::Status object.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.

read_report

Synopsis

read_report ($token, $subject, $output_format) 

Description

This function returns the report most recently generated by the generateReport() function.

Input Parameters

Parameter
Type
Value
Description

token

UserToken, mandatory

A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.

subject

ReportSubject, mandatory

RMA_DISCREPANCY, LIC_DISCREPANCY, REDEPLOYABLE_LICENSE, DEVICE_SUMMARY, UNUSED_LICENSE, AUDITTRAIL

Enumeration value that represents the subject of the report to be generated.

output_format

OutputFormat, mandatory

HTML, text

Enumeration value that represents HTML or text format.


Return

This function returns a text string containing the report.

Error and Exception

If a system error prevents the operation from completing, a RemoteException is thrown.

When an error occurs, this function returns null.