Cisco License Manager 2.1 Perl API Guide
ch15parg.fm

Table Of Contents

User Login and Logout Functions

check_user_eula_status

login

logout


User Login and Logout Functions


This chapter provides information about the following user login and logout functions:

check_user_eula_status

login

logout

check_user_eula_status

Synopsis

check_user_eula_status ($username, $server_host, $port) 

Description

This function checks to see if the user has already signed an end-user license agreement (EULA).

Input Parameters

Parameter
Type
Value
Description

username

String, mandatory

The username.

server_host

String, mandatory

Hostname or IP address

The hostname or IP address where the Cisco License Manager server is running. If the Cisco License Manager server and the client program are running on the same host, this argument can be set to null.

port

Integer, mandatory

Range from 1024 to 65535

The port on which the Cisco License Manager server is serving clients. If the Cisco License Manager server and the client program are running on the same host, this argument can be set to zero.


Return

This function returns a Cisco::CLM::Common::EulaInfo object. The EulaInfo object returns the status of EULA acceptance and the time of acceptance.

Error and Exception

When an error occurs, this function returns null.

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

login

Synopsis

login($user, $password, $server_host, $port, $idle_timeout, $eula)

Description

Use this function to log into the system and acquire a Cisco::CLM::Common::UserToken that gives you authorization on subsequent function calls. A user can only log into the system one session at a time. A second login by the same user automatically logs out the previous login session.

Input Parameters

Parameter
Type
Value
Description

username

String, mandatory

The username.

password

String, mandatory

The user password.

server_host

String, mandatory

Hostname or IP address

The hostname or IP address where the Cisco License Manager server is running. If Cisco License Manager server and the client program are running on the same host, this argument can be set to null.

port

Integer, mandatory

Range from 0 to 65535

The port on which the Cisco License Manager server is serving clients. If the Cisco License Manager server and the client program are running on the same host, this argument can be set to zero.

idle_timeout

Integer, mandatory

Valid integer

Time interval, in minutes, allowed for idling before the token expires. When it is set to 0, the token never expires.

eula

EulaInfo, mandatory

The EulaInfo object contains a EULA statement and a Boolean value I_have_read_and_I_accept_this_EULA.


Return

This function returns a Cisco::CLM::Common::UserToken object that represents the user's authorization pass. If the EULA is not accepted, the method returns null.

Error and Exception

When an error occurs, this function returns null.

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

logout

Synopsis

logout($token) 

Description

This function logs the user out of the system and deletes the UserToken object.

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.


Return

None.

Error and Exception

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