Java API Reference Guide for Cisco License Manager
Chapter 1: Getting Started

Table Of Contents

Getting Started

Overview

Installation

API Prerequisites

Installing the Cisco License Manager SDK

Using the SDK


Getting Started


This chapter provides overview and installation information needed to use the Java application programming interface (API) with Cisco License Manager Release 2.0 and contains the following sections:

Overview

Installation

Using the SDK

Overview

Cisco License Manager provides an object-oriented Java API for client programs to invoke functions implemented in the Cisco License Manager back-end server.

The API is a set of Java class libraries in a single Java archive (JAR) file. The top-level class License Manager contains all functions that can be invoked by client programs. This is the same class library set used by the Cisco License Manager graphical user interface (GUI). This guide provides the external Java API as seen by its client programs and includes the following functions:

addDevicesToGroup, page 4-1

addPAKsToFolder, page 6-1

addUserToDeviceAccessList, page 2-1

addUserToGroupAccessList, page 2-2

addUserToPAKAccessList, page 2-3

asyncAnnotateLicenseLines, page 8-1

asyncAnnotateLicenses, page 7-1

asyncDeployLicenseLines, page 8-3

asyncDeployLicenses, page 7-3

asyncDiscoverDevices, page 5-1

asyncDownloadPAKInfo, page 11-1

asyncExecutePolicy, page 12-1

asyncObtainLicense, page 7-4

asyncPollDeviceLicenseInfo, page 5-4

AuditTrailRecords, page 3-1

checkCiscoPortalConnection, page 15-1

checkDeviceConnection, page 15-1

checkUserEULAStatus, page 16-1

createDeviceGroup, page 4-2

createDevicesByIPAddr, page 5-5

createDevicesByUDI, page 5-7

createFolder, page 6-2

createPAKs, page 11-3

createPolicy, page 12-3

createUser, page 17-1

deleteAsyncOperationJobRecords, page 5-8

deleteDeviceGroup, page 4-3

deleteDevices, page 5-9

deleteFolder, page 6-3

deletePAKs, page 11-4

deletePolicy, page 12-4

deleteUser, page 17-2

deregisterNotificationListener, page 10-1

disableNotificationByEmail, page 10-2

enableNotificationByEmail, page 10-2

enumerateDeviceFilterAttribute, page 12-4

enumerateSKUFilterAttribute, page 12-5

generateReport, page 13-1

getAssociatedActions, page 2-4

getAsyncOperationJobRecords, page 5-10

getAsyncOperationStatus, page 5-11

getLicenseLinesByLicense, page 8-4

getLicenseLinesOnDevice, page 8-5

getLicensesOnDevice, page 7-6

getRehostInfo, page 7-7

getUserAccessListFromDevice, page 2-4

getUserAccessListFromGroup, page 2-5

getUserAccessListFromPAK, page 2-6

initRehostLicense, page 7-7

killAsyncOperation, page 5-12

LicenseManager (Default), page 9-1

LicenseManager (Nondefault), page 9-1

listAllAsyncOperationJobRecords, page 5-12

listAllDevicesInGroup, page 5-13

listAllFolders, page 6-3

listAllFoldersByPAK, page 11-6

listAllGroups, page 4-3

listAllGroupsByDevice, page 5-14

listAllLicensesInPAK, page 7-8

listAllPAKsInFolder, page 11-6

listAllPolicies, page 12-6

listAllUsers, page 17-3

listDeviceIdsByFilter, page 5-14

listExpiredLicenseLines, page 8-6

listFilteredDevices, page 12-6

listFilteredSKUs, page 12-7

listPAKContainFeatures, page 11-7

listRunningAsyncOperationJobRecords, page 5-15

listScheduler, page 14-1

login, page 16-2

logout, page 16-3

obtainLicenseForRehost, page 7-9

readAuditTrailRecords, page 3-2

readDevices, page 5-16

readLicenseLines, page 8-7

readLicenses, page 7-10

readPAKs, page 11-8

readPolicy, page 12-7

readReport, page 13-2

readUserInfo, page 17-3

reCreateDevices, page 5-17

registerNotificationListener, page 10-3

registerScheduler, page 14-2

rehostLicense, page 7-12

removeAccessListFromDevice, page 2-6

removeAccessListFromGroup, page 2-7

removeDevicesFromGroup, page 4-4

removePAKsFromFolder, page 6-4

removeUserFromDeviceAccessList, page 2-8

removeUserFromGroupAccessList, page 2-8

removeUserFromPAKAccessList, page 2-9

renameDeviceGroup, page 4-5

renameFolder, page 6-5

reObtainLicense, page 7-12

resendLicense, page 7-13

revokeLicenseForRehost, page 7-14

setAsyncOperationJobComment, page 5-19

unregisterScheduler, page 14-2

writeDevices, page 5-19

writeLicenseLines, page 8-8

writeLicenses, page 7-15

writePAKs, page 11-9

writePolicy, page 12-8

writeUserInfo, page 17-4


Installation

The Java API communicates with the Cisco License Manager Server using Java.

This section provides the following installation information:

API Prerequisites

Installing the Cisco License Manager SDK

API Prerequisites

The API requires Java Development Kit (JDK) Version 1.5.

The following table provides details of the recommended software and hardware requirements for the Cisco License Manager server. These recommended requirements support the maximum data capacity (30,000 Cisco devices in the network). Also use these requirements if you are installing the server and client on the same host.

Table 1-1 Server Recommended Software and Hardware Requirements

Requirement Type
Recommended Requirement

Processor

Intel Pentium 4 3.2 GHz or equivalent CPU-based machine

Sun UltraSPARC IIIi or equivalent CPU-based machine

Software

Operating system

Windows Server 2003 R2 Standard Edition

Windows XP Professional

Solaris 10 (SPARC system only)

RAM

2 GB

Disk

10 GB


The following table provides details of the recommended software and hardware requirements for the Cisco License Manager client workstation.

Table 1-2 Client Workstation Recommended Software and Hardware Requirements

Requirement Type
Recommended Requirement

Processor

Intel Pentium 4 3.2 GHz or equivalent CPU-based machine

Sun UltraSPARC IIIi or equivalent CPU-based machine

Software

Operating system

Windows Server 2003 R2 Standard Edition

Windows XP Professional

Solaris 10 (SPARC system only)

RAM

1 GB

Disk

10 GB

Network connectivity

Server must be reachable from the client software.

Java requirements

Version 1.5


Installing the Cisco License Manager SDK

Cisco recommends that you install the Cisco License Manager Software Developer Kit (SDK) on the same machine on which the server resides.

To install the Cisco License Manager SDK, complete the following steps:


Step 1 Copy clm_java_sdk.zip from the CD to a local drive.

Step 2 Unzip the file.

The folder "CiscoLicenseManager_JAVA_SDK" is created on the local drive. It contains these files:

clm-sdk.jar

clm_ssl_rmi.cert

conf, a folder containing the file ClmErrorMessages.properties.


Using the SDK

Complete the following steps to begin using the SDK:


Step 1 Add clm-sdk.jar to the Java classpath when compiling and running the client program.

javac -classpath clm-sdk.jar MyProgram.java

Step 2 If the Cisco License Manager License Manager server is SSL enabled:

Run the following command to import the Cisco License Manager certifcate file, clm_ssl_rmi.cer, to the trust store on your client system:

%JAVA_HOME%\bin\keytool -import -keystore <keystore_file_path> -alias 
ciscolicensemanagerca -file <clm_ssl_rmi_cer_file_path>   

where <keystore_file_path> is the trust store of your client system, for example, C:\jdk1.5\jre\lib\security\cacerts, and <clm_ssl_rmi_cer_file_path> is the fullpath of the clm_ssl_rmi.cer file, for example, C:\CLM2.0_SDK\clm_ssl_rmi.cer.

Step 3 Start the Cisco License Manager server. For details, refer to the User Guide for Cisco License Manager.

Step 4 Start the client program.