05.02.2013 Views

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>opsi</strong> <strong>manual</strong> <strong>opsi</strong> <strong>version</strong> <strong>4.0.2</strong><br />

The use of a license option can be released by calling:<br />

deleteSoftwareLicenseUsage<br />

110 / 193<br />

Again the parameters to be passed are the hostID and alternatively the licensePoolId, productID or Windows Software<br />

ID. Calling this service releases the license option and returns it to the pool of available license options.<br />

For the complete documentation of <strong>opsi</strong> service calls see below.<br />

14.6.2 <strong>opsi</strong>-winst script calls for requesting and releasing of licenses<br />

The <strong>opsi</strong>-winst provides the client related calls as <strong>opsi</strong>-winst commands.<br />

A <strong>opsi</strong>-winst script can make a call to the function DemandLicenseKey to get a license key for installing. The<br />

parameters to be passed are:<br />

DemandLicenseKey (poolId [, productId [, windowsSoftwareId]])<br />

The return value is the license key (can be empty) as a string:<br />

set $mykey$ = DemandLicenseKey ("pool_office2007")<br />

The returned license key can be used by other script command for installing the software.<br />

For releasing a license option and license key (as to be used in a <strong>opsi</strong>-winst deinstallation script) the command<br />

FreeLicense is available with the following syntax:<br />

FreeLicense (poolId [, productId [, windowsSoftwareId]])<br />

The boolean function<br />

<strong>opsi</strong>LicenseManagementEnabled<br />

can be used to check whether the <strong>opsi</strong> license management is enabled and can be used for scripting:<br />

if <strong>opsi</strong>LicenseManagementEnabled<br />

set $mykey$ = DemandLicenseKey ("pool_office2007")<br />

else<br />

set $mykey$ = IniVar("productkey")<br />

The service calls can be invoked from the command line tool <strong>opsi</strong>-admin.<br />

Parameters marked with * are optional.<br />

14.6.3 License contracts<br />

method createLicenseContract(*licenseContractId, *partner, *conclusionDate, *notificationDate, *expirationDate, *notes)<br />

This method registers a new license contract record with the ID licenseContractId. If no licenseContractId is passed,<br />

it will be generated automatically. Using the licenseContractId of an existing contract, this contract can be edited.<br />

The parameters partner (co-contractor) and notes are strings and can be filled with any information desired. The parameters<br />

conclusionDate (date of conclusion of the contract), notificationDate (date for a reminder) and expirationDate<br />

(expiration date of the contract) are passed in the format YYYY-MM-DD (e.g. 2009-05-18).<br />

The method returns the licenseContractId of the contract.<br />

else<br />

set $mykey$ = DemandLicenseKey ("pool_office2007")<br />

set $mykey$ = IniVar("productkey")

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!