Create a custom script for a legacy Software Asset Management plugin license type
-
- UpdatedAug 3, 2023
- 2 minutes to read
- Vancouver
- Asset Management
Create a custom script for a legacy Software Asset Management plugin license type
By default, the Script field in the legacy Software Asset Management (com.snc.software_asset_management) plugin Software License Calculation form contains information about available variables and an example script.
You can use the example as the basis of the custom script or replace the example entirely.
The following functions are available as part of the SAMUtil script include and can be used in custom scripts.
Functions | Description |
---|---|
getWorkstationInstallsOrUsages | Returns a list of other installs on the given workstation. |
getUserInstallsOrUsages | Returns a list of all other installs belonging to the user. |
createCounterViolation | Returns insert a counter violation for the current counter with the given cause. |
Example:
The following script uses the number of rights equal to the number of CPU sockets on the machine the script is installed on. The workstation variable is used to identify any workstation that is in the development environment. If such a workstation is found, the script then assigns a valuation equal to the number of CPU sockets on the machine. Otherwise, if the workstation is not in the development environment, then no rights are assigned.
