]> git.uio.no Git - virt-orchestrator.git/blob - vFLOWER/content/Actions/com.vmware.library.vc.vm.spec.identity/getCustomizationLicenseFilePrintData.action.xml
første endring registrert
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.vm.spec.identity / getCustomizationLicenseFilePrintData.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getCustomizationLicenseFilePrintData" result-type="Any" api-version="3.1.0" id="45ce6046-66f1-48d0-85c5-eed4679711c3" version="0.2.0" allowed-operations="fv">
3     <description>The LicenseFilePrintData type maps directly to the LicenseFilePrintData key in the sysprep.inf answer file.</description>
4
5     <param n="autoMode" t="VC:CustomizationLicenseDataMode">Server licensing mode</param>
6
7     <param n="autoUsers" t="number">This key is valid only if AutoMode = PerServer.</param>
8
9     <script encoded="false">
10 var license;
11 try {
12         checkParam();
13         license = new VcCustomizationLicenseFilePrintData();
14         affectParam();
15         return license;
16 }
17 catch (ex) {
18         throw "Unable to create VcCustomizationLicenseFilePrintData: " + ex;
19 }
20
21 function affectParam() {
22         //if (autoMode != null)
23         license.autoMode = VcCustomizationLicenseDataMode.fromString(autoMode.name);
24         if (autoUsers != null &amp;&amp; autoUsers &gt;= 0)
25                 license.autoUsers = autoUsers;
26         else
27                 System.debug("autoUsers is " + autoUsers);
28 }
29
30 function checkParam() {
31         if (autoMode == null) throw "autoMode cannot be null";
32         if (autoMode == VcCustomizationLicenseDataMode.perServer &amp;&amp; autoUsers == null) throw "autoMode is set to perServer, autoUsers cannot be null";
33 }
34     </script>
35 </dunes-script-module>