første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.vm.spec.identity / getCustomizationUserData.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getCustomizationUserData" result-type="Any" api-version="3.1.0" id="815294fd-ba3e-474e-ac34-ee1319459495" version="0.2.0" allowed-operations="fv">
3     <description>
4 Personal data pertaining to the owner of the virtual machine.
5     </description>
6
7     <param n="computerName" t="Any">VimCustomizationName: The computer name of the (Windows) virtual machine.</param>
8
9     <param n="fullName" t="string">User's full name.</param>
10
11     <param n="orgName" t="string">User's organization.</param>
12
13     <param n="productId" t="string">Microsoft Sysprep requires that a valid serial number be included in the answer file when mini-setup runs. This serial number is ignored if the original guest operating system was installed using a volume-licensed CD.</param>
14
15     <script encoded="false">
16 var userData;
17 try {
18         checkParams();
19         userData = new VcCustomizationUserData();
20         affectParams();
21         return userData;
22 }
23 catch (ex) {
24         throw "Unable to create VcCustomizationUserData: " + ex;
25 }
26
27 function affectParams() {
28         userData.computerName = computerName;
29         userData.fullName = fullName;
30         userData.orgName = orgName;
31         userData.productId = productId;
32 }
33
34 function checkParams() {
35         if (computerName == null) throw "hostname cannot be null";
36         if (((computerName instanceof VcCustomizationCustomName) || (computerName instanceof VcCustomizationFixedName) ||
37                  (computerName instanceof VcCustomizationPrefixName) || (computerName instanceof VcCustomizationUnknownName) ||
38                  (computerName instanceof VcCustomizationVirtualMachineName)) == false) {
39                 throw "computerName must be of type VcCustomizationCustomName, VcCustomizationFixedName, VcCustomizationPrefixName, VcCustomizationUnknownName, VcCustomizationVirtualMachineName";
40         }
41         if (fullName == null) throw "fullName cannot be null";
42         if (orgName == null) throw "orgName cannot be null";
43 }
44     </script>
45 </dunes-script-module>