første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.vm.spec.identity / getCustomizationLinuxPrep.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getCustomizationLinuxPrep" result-type="Any" api-version="3.1.0" id="060b0c32-d8b0-4726-882c-64ee9ef70cfa" version="0.2.0" allowed-operations="fv">
3     <description>This is the Linux counterpart to the Windows Sysprep object. LinuxPrep contains machine-wide settings that identify a Linux machine in the same way that the Sysprep type identifies a Windows machine.</description>
4
5     <param n="domain" t="string">The fully qualified domain name.</param>
6
7     <param n="hostName" t="Any">The network host name of the (Linux) virtual machine.</param>
8
9     <script encoded="false">
10 var linuxPrep;
11 try {
12         checkParams();
13         linuxPrep = new VcCustomizationLinuxPrep();
14         affectParams();
15         return linuxPrep;
16 }
17 catch (ex) {
18         throw "Unable to create VcCustomizationLinuxPrep: " + ex;
19 }
20
21 function affectParams() {
22         linuxPrep.domain = domain;
23         linuxPrep.hostName = hostName;
24 }
25
26 function checkParams() {
27         if (domain == null) domain = "";
28         if (hostName == null) throw "hostname cannot be null";
29         if (((hostName instanceof VcCustomizationCustomName) || (hostName instanceof VcCustomizationFixedName) ||
30                  (hostName instanceof VcCustomizationPrefixName) || (hostName instanceof VcCustomizationUnknownName) ||
31                  (hostName instanceof VcCustomizationVirtualMachineName)) == false) {
32                 throw "hostName must be of type VcCustomizationCustomName, VcCustomizationFixedName, VcCustomizationPrefixName, VcCustomizationUnknownName, VcCustomizationVirtualMachineName";
33         }
34 }
35     </script>
36 </dunes-script-module>