første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / uio / lib / vm / Clone, Linux with single NIC.workflow.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow xmlns="http://vmware.com/vco/workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://vmware.com/vco/workflow http://vmware.com/vco/workflow/Workflow-v4.xsd" root-name="item11" object-name="Workflow:name=generic" id="569edb26-b0dc-4ae0-802e-f90394e2084b" version="1.0.0" api-version="3.1.0" allowed-operations="fve" restartMode="1" resumeFromFailedMode="0">
3     <display-name>Clone, Linux with single NIC</display-name>
4
5     <description>Clones a Linux virtual machine, performs the guest operating system customization, and configures one virtual network card.</description>
6
7     <position x="60.0" y="30.0"/>
8
9     <input>
10         <param name="folder" type="VC:VmFolder">
11             <description>Virtual machine folder</description>
12         </param>
13         <param name="name" type="string">
14             <description>New virtual machine name</description>
15         </param>
16         <param name="vm" type="VC:VirtualMachine">
17             <description>Virtual machine to clone</description>
18         </param>
19         <param name="powerOn" type="boolean">
20             <description>Specifies whether or not the new virtual machine should be powered on after creation</description>
21         </param>
22         <param name="template" type="boolean">
23             <description>Specifies whether or not to mark the new virtual machine as a template</description>
24         </param>
25         <param name="datastore" type="VC:Datastore">
26             <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
27         </param>
28         <param name="host" type="VC:HostSystem">
29             <description>(Optional) Host on which to create the virtual machine</description>
30         </param>
31         <param name="pool" type="VC:ResourcePool">
32             <description>(Optional) Resource pool in which to create the virtual machine</description>
33         </param>
34         <param name="doSysprep" type="boolean">
35             <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
36         </param>
37         <param name="clientName" type="string">
38             <description>Name or prefix name of the Linux client</description>
39         </param>
40         <param name="network" type="VC:DistributedVirtualPortgroup">
41             <description>Network on which to attach the virtual network interface</description>
42         </param>
43         <param name="dnsServerList" type="Array/string">
44             <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
45         </param>
46         <param name="dnsDomain" type="string">
47             <description>(Optional) DNS domain suffix such as vmware.com</description>
48         </param>
49         <param name="dhcp" type="boolean">
50             <description>Use a DHCP server to configure the virtual network adapter</description>
51         </param>
52         <param name="gateway" type="Array/string">
53             <description>(Optional) List of gateways, in order of preference</description>
54         </param>
55         <param name="ipAddress" type="string">
56             <description>Fixed, valid IP address</description>
57         </param>
58         <param name="macAddress" type="string">
59             <description>(Optional) The MAC address of a network adapter being customized. If it is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order</description>
60         </param>
61         <param name="subnetMask" type="string">
62             <description>[Optional] Subnet mask for this virtual network adapter</description>
63         </param>
64     </input>
65
66     <output>
67         <param name="newVM" type="VC:VirtualMachine">
68             <description>The newly created virtual machine</description>
69         </param>
70     </output>
71
72     <attrib name="task" type="VC:Task" read-only="false">
73         <value encoded="n">__NULL__</value>
74         <description>Task to await</description>
75     </attrib>
76     <attrib name="progress" type="boolean" read-only="false">
77         <value encoded="n">false</value>
78         <description>Log progress while waiting for the task to complete</description>
79     </attrib>
80     <attrib name="pollRate" type="number" read-only="false">
81         <value encoded="n">30.0</value>
82         <description>Polling rate for the task state, in seconds</description>
83     </attrib>
84     <attrib name="spec" type="Any" read-only="false">
85         <value encoded="n">__NULL__</value>
86         <description>Specifies how to clone the virtual machine (VimVirtualMachineCloneSpec)</description>
87     </attrib>
88     <attrib name="location" type="Any" read-only="false">
89         <value encoded="n">__NULL__</value>
90         <description>Specifies the location of resources the cloned virtual machine will be using (VirtualMachineRelocateSpec)</description>
91     </attrib>
92     <attrib name="customization" type="Any" read-only="false">
93         <value encoded="n">__NULL__</value>
94         <description>Optional guest operating system customization specification (CustomizationSpec)</description>
95     </attrib>
96     <attrib name="globalIPSettings" type="Any" read-only="false">
97         <value encoded="n">__NULL__</value>
98         <description>Global IP settings constitute the IP settings that are not specific to a particular virtual network adapter (VimCustomizationGlobalIPSettings)</description>
99     </attrib>
100     <attrib name="identity" type="Any" read-only="false">
101         <value encoded="n">__NULL__</value>
102         <description>Network identity and settings, similar to Microsoft's Sysprep tool. This is a Sysprep, LinuxPrep, or SysprepText object (VimCustomizationIdentitySettings)</description>
103     </attrib>
104     <attrib name="nicSettingMaps" type="Array/Any" read-only="false">
105         <value encoded="n">__NULL__</value>
106         <description>(Optional) IP settings that are specific to a particular virtual network adapter (an array of VimCustomizationAdapterMapping)</description>
107     </attrib>
108     <attrib name="options" type="Any" read-only="false">
109         <value encoded="n">__NULL__</value>
110         <description>Optional operations (VimCustomizationOptions: LinuxOptions or WinOptions)</description>
111     </attrib>
112     <attrib name="adapterMapping" type="Any" read-only="false">
113         <value encoded="n">__NULL__</value>
114         <description>Data object type to associate a virtual network adapter with its IP settings</description>
115     </attrib>
116     <attrib name="startVm" type="boolean" read-only="false">
117         <value encoded="n">false</value>
118         <description>Specifies whether to start the cloned virtual machine. Depends on the values set for 'template', 'doSysprep' and 'powerOn' attributes</description>
119     </attrib>
120     <attrib name="tempNewVm" type="VC:VirtualMachine" read-only="false">
121         <value encoded="n">__NULL__</value>
122         <description>The newly created virtual machine</description>
123     </attrib>
124     <attrib name="pollingRate" type="number" read-only="false">
125         <value encoded="n">5.0</value>
126         <description>Polling rate for the task state, in seconds</description>
127     </attrib>
128     <attrib name="timeout" type="number" read-only="false">
129         <value encoded="n">60.0</value>
130         <description>Timeout period to elapse before throwing a timeout exception, in minutes</description>
131     </attrib>
132     <attrib name="sourceVirtualEthernetCard" type="Any" read-only="false">
133         <value encoded="n">__NULL__</value>
134         <description>The VirtualEthernetCard the template defines</description>
135     </attrib>
136     <attrib name="virtualEthernetCard" type="Any" read-only="false">
137         <value encoded="n">__NULL__</value>
138         <description>The VirtualEthernetCard instance the virtual machine uses</description>
139     </attrib>
140     <attrib name="config" type="Any" read-only="false">
141         <value encoded="n">__NULL__</value>
142         <description>(Optional) Specification of changes to the virtual hardware (VirtualMachineConfigSpec)</description>
143     </attrib>
144     <attrib name="deviceChange" type="Array/Any" read-only="false">
145         <value encoded="n">__NULL__</value>
146         <description>(Optional) Set of virtual devices being modified by the configuration operation (an array of VirtualDeviceConfigSpec)</description>
147     </attrib>
148     <attrib name="addNumberToName" type="boolean" read-only="true">
149         <value encoded="n">false</value>
150         <description>Append a number to the client name to ensure the name is unique</description>
151     </attrib>
152     <attrib name="nicPosition" type="number" read-only="false">
153         <value encoded="n">1.0</value>
154         <description>Specifies which network card to use. If no valid value, the first network card is used</description>
155     </attrib>
156     <attrib name="targetDatastore" type="VC:Datastore" read-only="false">
157         <value encoded="n">__NULL__</value>
158         <description>Datastore in which to store the virtual machine</description>
159     </attrib>
160     <attrib name="templateAttr" type="boolean" read-only="false">
161         <value encoded="n">false</value>
162         <description>Specifies whether or not to mark the new virtual machine as a template</description>
163     </attrib>
164     <workflow-note x="870.0" y="400.0" w="210.0" h="130.0" color="d7a1d7ff">
165         <description>Clone VM and wait</description>
166     </workflow-note>
167     <workflow-note x="70.0" y="480.0" w="210.0" h="50.0">
168         <description>Relocate Spec</description>
169     </workflow-note>
170     <workflow-note x="70.0" y="190.0" w="210.0" h="240.0">
171         <description>Customization Spec</description>
172     </workflow-note>
173     <workflow-note x="590.0" y="480.0" w="190.0" h="50.0" color="bfdfffff">
174         <description>Compile specs to Clone Spec</description>
175     </workflow-note>
176     <workflow-note x="660.0" y="200.0" w="240.0" h="50.0" color="bfffbfff">
177         <description>Wait for the sysprep operation to be terminated</description>
178     </workflow-note>
179     <workflow-note x="310.0" y="210.0" w="240.0" h="320.0">
180         <description>Config Spec</description>
181     </workflow-note>
182
183     <workflow-item name="item0" out-name="item1" business-status="Preparing Clone" type="task" script-module="com.vmware.library.vc.vm.spec/checkVMwareInput">
184         <display-name>checkVMwareInput</display-name>
185
186         <script encoded="false">
187 //Auto generated script, cannot be modified !
188 System.getModule("com.vmware.library.vc.vm.spec").checkVMwareInput(vm,folder,datastore,host,pool) ;
189         </script>
190
191         <in-binding>
192             <bind name="datastore" type="VC:Datastore" export-name="targetDatastore">
193                 <description>Target datastore</description>
194             </bind>
195             <bind name="folder" type="VC:VmFolder" export-name="folder">
196                 <description>Target folder</description>
197             </bind>
198             <bind name="host" type="VC:HostSystem" export-name="host">
199                 <description>Target host</description>
200             </bind>
201             <bind name="pool" type="VC:ResourcePool" export-name="pool">
202                 <description>Target pool</description>
203             </bind>
204             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
205                 <description>VM to clone</description>
206             </bind>
207         </in-binding>
208
209         <out-binding/>
210
211         <position x="140.0" y="80.0"/>
212     </workflow-item>
213
214     <workflow-item name="item2" out-name="item13" business-status="Cloning" type="task" script-module="com.vmware.library.vc.basic/vim3WaitTaskEnd">
215         <display-name>vim3WaitTaskEnd</display-name>
216
217         <script encoded="false">
218 //Auto generated script, cannot be modified !
219 actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
220         </script>
221
222         <in-binding>
223             <bind name="pollRate" type="number" export-name="pollRate">
224                 <description>Polling rate for the task state [seconds]</description>
225             </bind>
226             <bind name="progress" type="boolean" export-name="progress">
227                 <description>Log progess while waiting for the task</description>
228             </bind>
229             <bind name="task" type="VC:Task" export-name="task">
230                 <description>Task to Wait for</description>
231             </bind>
232         </in-binding>
233
234         <out-binding>
235             <bind name="actionResult" type="Any" export-name="tempNewVm"/>
236         </out-binding>
237
238         <description>
239 Wait a VIM 3 Task to end.
240 When task ended, return the
241         </description>
242
243         <position x="940.0" y="440.0"/>
244     </workflow-item>
245
246     <workflow-item name="item3" out-name="item2" business-status="Cloning" type="task" script-module="com.vmware.library.vc.vm/cloneVM">
247         <display-name>cloneVM</display-name>
248
249         <script encoded="false">
250 //Auto generated script, cannot be modified !
251 actionResult = System.getModule("com.vmware.library.vc.vm").cloneVM(vm,folder,name,spec) ;
252         </script>
253
254         <in-binding>
255             <bind name="folder" type="VC:VmFolder" export-name="folder">
256                 <description>The location of the new virtual machine.</description>
257             </bind>
258             <bind name="name" type="string" export-name="name">
259                 <description>The name of the new virtual machine.</description>
260             </bind>
261             <bind name="spec" type="Any" export-name="spec">
262                 <description>VimVirtualMachineCloneSpec: Specifies how to clone the virtual machine.</description>
263             </bind>
264             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
265                 <description>VM to clone</description>
266             </bind>
267         </in-binding>
268
269         <out-binding>
270             <bind name="actionResult" type="VC:Task" export-name="task"/>
271         </out-binding>
272
273         <position x="940.0" y="500.0"/>
274     </workflow-item>
275
276     <workflow-item name="item4" out-name="item3" type="task" script-module="com.vmware.library.vc.vm.spec/getCloneSpec">
277         <display-name>getCloneSpec</display-name>
278
279         <script encoded="false">
280 //Auto generated script, cannot be modified !
281 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCloneSpec(config,customization,location,powerOn,template) ;
282         </script>
283
284         <in-binding>
285             <bind name="config" type="Any" export-name="config">
286                 <description>[optional] VirtualMachineConfigSpec: An optional specification of changes to the virtual hardware.</description>
287             </bind>
288             <bind name="customization" type="Any" export-name="customization">
289                 <description>[optional] CustomizationSpec: An optional guest operating system customization specification.</description>
290             </bind>
291             <bind name="location" type="Any" export-name="location">
292                 <description>VirtualMachineRelocateSpec: A type of RelocateSpec that specifies the location of resources the newly cloned virtual machine will use</description>
293             </bind>
294             <bind name="powerOn" type="boolean" export-name="startVm">
295                 <description>Specifies whether or not the new VirtualMachine should be powered on after creation</description>
296             </bind>
297             <bind name="template" type="boolean" export-name="templateAttr">
298                 <description>Specifies whether or not the new virtual machine should be marked as a template.</description>
299             </bind>
300         </in-binding>
301
302         <out-binding>
303             <bind name="actionResult" type="Any" export-name="spec"/>
304         </out-binding>
305
306         <position x="640.0" y="500.0"/>
307     </workflow-item>
308
309     <workflow-item name="item6" out-name="item23" type="task" script-module="com.vmware.library.vc.vm.spec/getRelocateSpec">
310         <display-name>getRelocateSpec</display-name>
311
312         <script encoded="false">
313 //Auto generated script, cannot be modified !
314 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getRelocateSpec(datastore,disk,host,pool,transform) ;
315         </script>
316
317         <in-binding>
318             <bind name="datastore" type="VC:Datastore" export-name="targetDatastore">
319                 <description>[optional] The datastore where the virtual machine should be located. If not specified, the current datastore is used</description>
320             </bind>
321             <bind name="disk" type="Array/Any" explicitly-not-bound="true" export-name="NULL">
322                 <description>[optional] Array of VirtualMachineRelocateSpecDiskLocator: An optional list that allows specifying the datastore location for each virtual disk.</description>
323             </bind>
324             <bind name="host" type="VC:HostSystem" export-name="host">
325                 <description>[optional] The target host for the virtual machine.</description>
326             </bind>
327             <bind name="pool" type="VC:ResourcePool" export-name="pool">
328                 <description>[optional] The resource pool to which this virtual machine should be attached.</description>
329             </bind>
330             <bind name="transform" type="VC:VirtualMachineRelocateTransformation" explicitly-not-bound="true" export-name="NULL">
331                 <description>[optional] Transformation to perform on the disks.</description>
332             </bind>
333         </in-binding>
334
335         <out-binding>
336             <bind name="actionResult" type="Any" export-name="location"/>
337         </out-binding>
338
339         <position x="140.0" y="500.0"/>
340     </workflow-item>
341
342     <workflow-item name="item7" out-name="item6" type="task" script-module="com.vmware.library.vc.vm.spec/getCustomizationSpec">
343         <display-name>getCustomizationSpec</display-name>
344
345         <script encoded="false">
346 //Auto generated script, cannot be modified !
347 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCustomizationSpec(globalIPSettings,identity,nicSettingMap,options) ;
348         </script>
349
350         <in-binding>
351             <bind name="globalIPSettings" type="Any" export-name="globalIPSettings">
352                 <description>VimCustomizationGlobalIPSettings: Global IP settings constitute the IP settings that are not specific to a particular virtual network adapter.</description>
353             </bind>
354             <bind name="identity" type="Any" export-name="identity">
355                 <description>VimCustomizationIdentitySettings: Network identity and settings, similar to Microsoft's Sysprep tool. This is a Sysprep, LinuxPrep, or SysprepText object.</description>
356             </bind>
357             <bind name="nicSettingMap" type="Array/Any" export-name="nicSettingMaps">
358                 <description>[Optional] Array of VimCustomizationAdapterMapping: IP settings that are specific to a particular virtual network adapter.</description>
359             </bind>
360             <bind name="options" type="Any" export-name="options">
361                 <description>[Optional] VimCustomizationOptions: Optional operations (either LinuxOptions or WinOptions).</description>
362             </bind>
363         </in-binding>
364
365         <out-binding>
366             <bind name="actionResult" type="Any" export-name="customization"/>
367         </out-binding>
368
369         <position x="140.0" y="400.0"/>
370     </workflow-item>
371
372     <workflow-item name="item8" out-name="item5" type="task" script-module="com.vmware.library.vc.vm.spec/getCustomizationGlobalIPSettings">
373         <display-name>getCustomizationGlobalIPSettings</display-name>
374
375         <script encoded="false">
376 //Auto generated script, cannot be modified !
377 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCustomizationGlobalIPSettings(dnsServerList,dnsSuffixList) ;
378         </script>
379
380         <in-binding>
381             <bind name="dnsServerList" type="Array/string" explicitly-not-bound="true" export-name="NULL">
382                 <description>[Optional] List of DNS servers, for a virtual network adapter with a static IP address</description>
383             </bind>
384             <bind name="dnsSuffixList" type="Array/string" explicitly-not-bound="true" export-name="NULL">
385                 <description>[Optional] List of name resolution suffixes for the virtual network adapter</description>
386             </bind>
387         </in-binding>
388
389         <out-binding>
390             <bind name="actionResult" type="Any" export-name="globalIPSettings"/>
391         </out-binding>
392
393         <position x="140.0" y="220.0"/>
394     </workflow-item>
395
396     <workflow-item name="item9" out-name="item10" type="link" linked-workflow-id="BD80808080808080808080808080808094C280800122528313869552e41805bb1">
397         <display-name>Get 1 Nic Setting Map</display-name>
398
399         <in-binding>
400             <bind name="dhcp" type="boolean" export-name="dhcp">
401                 <description>Use a DHCP server to configure the virtual network adapter.</description>
402             </bind>
403             <bind name="dnsDomain" type="string" export-name="dnsDomain">
404                 <description>[Optional] A DNS domain suffix such as dunes.ch.</description>
405             </bind>
406             <bind name="dnsServerList" type="Array/string" export-name="dnsServerList">
407                 <description>[Optional] A list of server IP addresses to use for DNS lookup in a Windows guest operating system.</description>
408             </bind>
409             <bind name="gateway" type="Array/string" export-name="gateway">
410                 <description>[Optional] List of gateways, in order of preference.</description>
411             </bind>
412             <bind name="ipAddress" type="string" export-name="ipAddress">
413                 <description>A Fixed valid IP Address</description>
414             </bind>
415             <bind name="macAddress" type="string" export-name="macAddress">
416                 <description>[Optional] The MAC address of a network adapter being customized. If it is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order.</description>
417             </bind>
418             <bind name="netBIOS" type="VC:CustomizationNetBIOSMode" explicitly-not-bound="true" export-name="NULL">
419                 <description>[Optional] NetBIOS setting for Windows.</description>
420             </bind>
421             <bind name="primaryWINS" type="string" explicitly-not-bound="true" export-name="NULL">
422                 <description>[Optional] The IP address of the primary WINS server. This property is ignored for Linux guest operating systems.</description>
423             </bind>
424             <bind name="secondaryWINS" type="string" explicitly-not-bound="true" export-name="NULL">
425                 <description>[Optional] The IP address of the secondary WINS server. This property is ignored for Linux guest operating systems.</description>
426             </bind>
427             <bind name="subnetMask" type="string" export-name="subnetMask">
428                 <description>[Optional] Subnet mask for this virtual network adapter.</description>
429             </bind>
430         </in-binding>
431
432         <out-binding>
433             <bind name="adapterMapping" type="Any" export-name="adapterMapping">
434                 <description>Data object type to associate a virtual network adapter with its IP settings.</description>
435             </bind>
436         </out-binding>
437
438         <position x="140.0" y="320.0"/>
439     </workflow-item>
440
441     <workflow-item name="item10" out-name="item7" type="task">
442         <display-name>Nic -&gt; Nic[]</display-name>
443
444         <script encoded="false">
445 nicSettingMaps = new Array(adapterMapping);
446         </script>
447
448         <in-binding>
449             <bind name="adapterMapping" type="Any" export-name="adapterMapping"/>
450         </in-binding>
451
452         <out-binding>
453             <bind name="nicSettingMaps" type="Array/Any" export-name="nicSettingMaps"/>
454         </out-binding>
455
456         <position x="140.0" y="360.0"/>
457     </workflow-item>
458
459     <workflow-item name="item1" out-name="item8" type="task">
460         <display-name>Set start vm?</display-name>
461
462         <script encoded="false">
463 if (template) {
464         startVm = false;
465 }
466 else if (doSysprep) {
467         startVm = true;
468 }
469 else {
470         startVm = powerOn;
471 }
472         </script>
473
474         <in-binding>
475             <bind name="doSysprep" type="boolean" export-name="doSysprep"/>
476             <bind name="powerOn" type="boolean" export-name="powerOn"/>
477             <bind name="template" type="boolean" export-name="template"/>
478         </in-binding>
479
480         <out-binding>
481             <bind name="startVm" type="boolean" export-name="startVm"/>
482         </out-binding>
483
484         <position x="140.0" y="140.0"/>
485     </workflow-item>
486
487     <workflow-item name="item12" out-name="item28" type="condition" alt-out-name="item15" comparator="0">
488         <display-name>Template?</display-name>
489
490         <script encoded="false">
491 //Generated by the system, cannot be edited
492 return (template == true) ;
493         </script>
494
495         <in-binding>
496             <bind name="template" type="boolean" export-name="template"/>
497         </in-binding>
498         <condition name="template" type="boolean" comparator="0" label="null">false</condition>
499
500         <position x="940.0" y="290.0"/>
501     </workflow-item>
502
503     <workflow-item name="item13" out-name="item12" type="task">
504         <display-name>Set ouput vm</display-name>
505
506         <script encoded="false">
507 newVM = tempNewVm;
508         </script>
509
510         <in-binding>
511             <bind name="tempNewVm" type="VC:VirtualMachine" export-name="tempNewVm"/>
512         </in-binding>
513
514         <out-binding>
515             <bind name="newVM" type="VC:VirtualMachine" export-name="newVM"/>
516         </out-binding>
517
518         <position x="940.0" y="360.0"/>
519     </workflow-item>
520
521     <workflow-item name="item14" type="end" end-mode="0">
522         <position x="1220.0" y="290.0"/>
523     </workflow-item>
524
525     <workflow-item name="item15" out-name="item17" type="condition" alt-out-name="item16" comparator="0">
526         <display-name>Do sysprep?</display-name>
527
528         <script encoded="false">
529 //Generated by the system, cannot be edited
530 return (doSysprep == true) ;
531         </script>
532
533         <in-binding>
534             <bind name="doSysprep" type="boolean" export-name="doSysprep"/>
535         </in-binding>
536         <condition name="doSysprep" type="boolean" comparator="0" label="null">false</condition>
537
538         <position x="940.0" y="210.0"/>
539     </workflow-item>
540
541     <workflow-item name="item16" type="end" end-mode="0">
542         <position x="1120.0" y="210.0"/>
543     </workflow-item>
544
545     <workflow-item name="item18" out-name="item19" type="condition" alt-out-name="item20" comparator="0">
546         <display-name>Power on?</display-name>
547
548         <script encoded="false">
549 //Generated by the system, cannot be edited
550 return (powerOn == true) ;
551         </script>
552
553         <in-binding>
554             <bind name="powerOn" type="boolean" export-name="powerOn"/>
555         </in-binding>
556         <condition name="powerOn" type="boolean" comparator="0" label="null">false</condition>
557
558         <position x="760.0" y="150.0"/>
559     </workflow-item>
560
561     <workflow-item name="item19" type="end" end-mode="0">
562         <position x="960.0" y="150.0"/>
563     </workflow-item>
564
565     <workflow-item name="item21" type="end" end-mode="0">
566         <position x="960.0" y="70.0"/>
567     </workflow-item>
568
569     <workflow-item name="item22" out-name="item25" type="link" linked-workflow-id="BD8080808080808080808080808080808AC280800122528313869552e41805bb1">
570         <display-name>Get a VirtualEthernetCard to change the network</display-name>
571
572         <in-binding>
573             <bind name="sourceVirtualEthernetCard" type="Any" export-name="sourceVirtualEthernetCard"/>
574             <bind name="network" type="VC:DistributedVirtualPortgroup" export-name="network"/>
575         </in-binding>
576
577         <out-binding>
578             <bind name="virtualEthernetCard" type="Any" export-name="virtualEthernetCard"/>
579         </out-binding>
580
581         <position x="340.0" y="400.0"/>
582     </workflow-item>
583
584     <workflow-item name="item24" out-name="item27" type="condition" alt-out-name="item4" comparator="0">
585         <display-name>Nic found?</display-name>
586
587         <script encoded="false">
588 //Generated by the system, cannot be edited
589 return (sourceVirtualEthernetCard  != null ) ;
590         </script>
591
592         <in-binding>
593             <bind name="sourceVirtualEthernetCard" type="Any" export-name="sourceVirtualEthernetCard"/>
594         </in-binding>
595         <condition name="sourceVirtualEthernetCard" type="Any" comparator="0" label="null">__NULL__</condition>
596
597         <position x="340.0" y="290.0"/>
598     </workflow-item>
599
600     <workflow-item name="item25" out-name="item26" type="task">
601         <display-name>Get Device[]</display-name>
602
603         <script encoded="false">
604 var deviceChange = new Array();
605 var change = new VcVirtualDeviceConfigSpec();
606 change.device = virtualEthernetCard;
607 change.operation = VcVirtualDeviceConfigSpecOperation.edit;
608 deviceChange.push(change);
609         </script>
610
611         <in-binding>
612             <bind name="virtualEthernetCard" type="Any" export-name="virtualEthernetCard"/>
613         </in-binding>
614
615         <out-binding>
616             <bind name="deviceChange" type="Array/Any" export-name="deviceChange"/>
617         </out-binding>
618
619         <position x="340.0" y="440.0"/>
620     </workflow-item>
621
622     <workflow-item name="item26" out-name="item4" type="task" script-module="com.vmware.library.vc.vm.spec/getConfigSpecSimple">
623         <display-name>getConfigSpecSimple</display-name>
624
625         <script encoded="false">
626 //Auto generated script, cannot be modified !
627 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getConfigSpecSimple(deviceChange,files,flags,memoryMB,name,numCPUs) ;
628         </script>
629
630         <in-binding>
631             <bind name="deviceChange" type="Array/Any" export-name="deviceChange">
632                 <description>[optional] Array of VirtualDeviceConfigSpec: Set of virtual devices being modified by the configuration operation.</description>
633             </bind>
634             <bind name="files" type="Any" explicitly-not-bound="true" export-name="NULL">
635                 <description>[optional] VirtualMachineFileInfo: Information about virtual machine files</description>
636             </bind>
637             <bind name="flags" type="Any" explicitly-not-bound="true" export-name="NULL">
638                 <description>[optional] VirtualMachineFlagInfo: Additional flags for a virtual machine.</description>
639             </bind>
640             <bind name="memoryMB" type="number" explicitly-not-bound="true" export-name="NULL">
641                 <description>[optional] Size of a virtual machine's memory, in MB.</description>
642             </bind>
643             <bind name="name" type="string" explicitly-not-bound="true" export-name="NULL">
644                 <description>[optional] Display name of the virtual machine.</description>
645             </bind>
646             <bind name="numCPUs" type="number" explicitly-not-bound="true" export-name="NULL">
647                 <description>[optional] Number of virtual processors in a virtual machine.</description>
648             </bind>
649         </in-binding>
650
651         <out-binding>
652             <bind name="actionResult" type="Any" export-name="config"/>
653         </out-binding>
654
655         <description>
656 The ConfigSpec data object type encapsulates configuration settings when creating or reconfiguring a virtual machine. To support incremental changes, these properties are all optional. 
657 Basic Version
658         </description>
659
660         <position x="340.0" y="500.0"/>
661     </workflow-item>
662
663     <workflow-item name="item17" out-name="item18" business-status="Customizing" type="task" script-module="com.vmware.library.vc.vm.tools/vim3WaitDnsNameInTools">
664         <display-name>vim3WaitDnsNameInTools</display-name>
665
666         <script encoded="false">
667 //Auto generated script, cannot be modified !
668 System.getModule("com.vmware.library.vc.vm.tools").vim3WaitDnsNameInTools(vm,pollingRate,dnsNameToWait,timeout,addNumberToName) ;
669         </script>
670
671         <in-binding>
672             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm">
673                 <description>VM in which the action look to get the new DNS Name</description>
674             </bind>
675             <bind name="pollingRate" type="number" export-name="pollingRate">
676                 <description>Time between all request information on the tools [seconds]</description>
677             </bind>
678             <bind name="dnsNameToWait" type="string" export-name="clientName">
679                 <description>Define a specific DNS name to wait for (either in compute.dunes.ch or compute form)</description>
680             </bind>
681             <bind name="timeout" type="number" export-name="timeout">
682                 <description>Timeout before throwing a timeout exception [minutes]</description>
683             </bind>
684             <bind name="addNumberToName" type="boolean" export-name="addNumberToName">
685                 <description>Specify if the DNS name has an automatically number added at end (not known at clone time)</description>
686             </bind>
687         </in-binding>
688
689         <out-binding/>
690
691         <description>
692 Wait for a given name in the DNS guest informations (VMware tools).
693
694 Exception:
695 - Timeout: When timeout is reached
696         </description>
697
698         <position x="760.0" y="220.0"/>
699     </workflow-item>
700
701     <workflow-item name="item23" out-name="item24" type="task" script-module="com.vmware.library.vc.vm.network/getNicByNumber">
702         <display-name>getNicByNumber</display-name>
703
704         <script encoded="false">
705 //Auto generated script, cannot be modified !
706 actionResult = System.getModule("com.vmware.library.vc.vm.network").getNicByNumber(vm,nicPosition) ;
707         </script>
708
709         <in-binding>
710             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
711                 <description>VM from which to get the network card</description>
712             </bind>
713             <bind name="nicPosition" type="number" export-name="nicPosition">
714                 <description>Let you choose if you want to get the 1st, 2nd... 5th network card. If no valid value, 1st if used.</description>
715             </bind>
716         </in-binding>
717
718         <out-binding>
719             <bind name="actionResult" type="Any" export-name="sourceVirtualEthernetCard"/>
720         </out-binding>
721
722         <description>Return a Network card device (VimVirtualE1000, VimVirtualVmxnet, VimVirtualPCNet32). The network position let you choose if you want to get the 1st, 2nd... 5th network card.</description>
723
724         <position x="340.0" y="240.0"/>
725     </workflow-item>
726
727     <workflow-item name="item20" out-name="item21" type="link" linked-workflow-id="BD80808080808080808080808080808075C280800122528313869552e41805bb1">
728         <display-name>Shutdown guest OS and wait</display-name>
729
730         <in-binding>
731             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm"/>
732         </in-binding>
733
734         <out-binding/>
735
736         <description>Shutdown guest OS and wait.</description>
737
738         <position x="760.0" y="80.0"/>
739     </workflow-item>
740
741     <workflow-item name="item27" out-name="item22" type="condition" alt-out-name="item4" comparator="0">
742         <display-name>Network defined</display-name>
743
744         <script encoded="false">
745 //Generated by the system, cannot be edited
746 return (network  != null ) ;
747         </script>
748
749         <in-binding>
750             <bind name="network" type="VC:Network" export-name="network"/>
751         </in-binding>
752         <condition name="network" type="VC:Network" comparator="0" label="null"/>
753
754         <position x="340.0" y="350.0"/>
755     </workflow-item>
756
757     <workflow-item name="item5" out-name="item9" type="link" linked-workflow-id="BD80808080808080808080808080808039C280800122528313869552e41805bb1">
758         <display-name>Get Linux Customization</display-name>
759
760         <in-binding>
761             <bind name="domain" type="string" export-name="dnsDomain">
762                 <description>The fully qualified domain name.</description>
763             </bind>
764             <bind name="hostname" type="string" export-name="clientName">
765                 <description>The network host name of the (Linux) virtual machine.</description>
766             </bind>
767         </in-binding>
768
769         <out-binding>
770             <bind name="customizationLinuxPrep" type="Any" export-name="identity">
771                 <description>The CustomizationLinuxPrep corresponding</description>
772             </bind>
773         </out-binding>
774
775         <position x="140.0" y="260.0"/>
776     </workflow-item>
777
778     <workflow-item name="item11" out-name="item0" type="task">
779         <display-name>Set datastore if null</display-name>
780
781         <script encoded="false">
782 if (datastore != null) {
783         targetDatastore = datastore;
784 }
785 else {
786         targetDatastore = vm.datastore[0];
787 }
788         </script>
789
790         <in-binding>
791             <bind name="vm" type="VC:VirtualMachine" export-name="vm"/>
792             <bind name="datastore" type="VC:Datastore" export-name="datastore"/>
793         </in-binding>
794
795         <out-binding>
796             <bind name="targetDatastore" type="VC:Datastore" export-name="targetDatastore"/>
797         </out-binding>
798
799         <position x="140.0" y="40.0"/>
800     </workflow-item>
801
802     <workflow-item name="item28" out-name="item14" type="link" linked-workflow-id="BD80808080808080808080808080808093C380800122528313869552e41805bb1">
803         <display-name>Mark as Template</display-name>
804
805         <in-binding>
806             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm">
807                 <description>The VM to mark as template</description>
808             </bind>
809         </in-binding>
810
811         <out-binding/>
812
813         <description>Mark an existing VM as a template, preventing it to start</description>
814
815         <position x="1080.0" y="300.0"/>
816     </workflow-item>
817
818     <presentation>
819         <p-step>
820             <title>VMware Information</title>
821             <p-group>
822                 <title>Basic VM Information</title>
823                 <p-param name="vm">
824                     <desc>Virtual machine to clone</desc>
825                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
826                     <p-qual kind="static" name="show-select-as" type="string">live-search</p-qual>
827                 </p-param>
828                 <p-param name="name">
829                     <desc>Name of the new virtual machine</desc>
830                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
831                 </p-param>
832                 <p-param name="template">
833                     <desc>Mark the new virtual machine as a template</desc>
834                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
835                 </p-param>
836             </p-group>
837             <p-group>
838                 <title>Running informations</title>
839                 <p-qual kind="ognl" name="notVisible" type="boolean">#template</p-qual>
840                 <p-param name="powerOn">
841                     <desc>Power on the new virtual machine</desc>
842                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
843                 </p-param>
844                 <p-param name="pool">
845                     <desc>Resource pool</desc>
846                     <p-qual kind="static" name="show-select-as" type="string">tree</p-qual>
847                     <p-qual kind="ognl" name="sdkRootObject" type="any">GetAction("com.vmware.library.vc.basic","getVimHostForVimObject").call( #vm )</p-qual>
848                 </p-param>
849                 <p-param name="host">
850                     <desc>Host</desc>
851                     <p-qual kind="static" name="show-select-as" type="string">live-search</p-qual>
852                     <p-qual kind="ognl" name="linkedEnumeration" type="Array/VC:HostSystem">GetAction("com.vmware.library.vc.datastore","getAllAvaiblableHostForVM").call( #vm )</p-qual>
853                 </p-param>
854             </p-group>
855             <p-group>
856                 <title>Location informations</title>
857                 <p-param name="folder">
858                     <desc>Virtual machine folder</desc>
859                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
860                     <p-qual kind="static" name="show-select-as" type="string">tree</p-qual>
861                     <p-qual kind="ognl" name="sdkRootObject" type="any">GetAction("com.vmware.library.vc.basic","getVimHostForVimObject").call( #vm )</p-qual>
862                 </p-param>
863                 <p-param name="datastore">
864                     <desc>Datastore in which to store the virtual machine. If not specified, the current datastore is used</desc>
865                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
866                     <p-qual kind="static" name="show-select-as" type="string">list</p-qual>
867                     <p-qual kind="ognl" name="linkedEnumeration" type="Array/VC:Datastore">GetAction("com.vmware.library.vc.datastore","getDatastoreForHostAndResourcePool").call( #host , #pool, #vm )</p-qual>
868                 </p-param>
869             </p-group>
870         </p-step>
871         <p-step>
872             <title>Linux Customization Information</title>
873             <p-group>
874                 <title>Basic informations</title>
875                 <p-param name="doSysprep">
876                     <desc>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</desc>
877                     <p-qual kind="ognl" name="defaultValue" type="boolean">!#template</p-qual>
878                     <p-qual kind="ognl" name="notVisible" type="boolean">#template</p-qual>
879                 </p-param>
880                 <p-param name="clientName">
881                     <desc>Name or prefix name of the Linux client</desc>
882                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
883                 </p-param>
884             </p-group>
885         </p-step>
886         <p-step>
887             <title>Network information</title>
888             <p-group>
889                 <title>Network interface</title>
890                 <desc>If the mac address is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order.</desc>
891                 <p-param name="macAddress">
892                     <desc>The MAC address of a network adapter being customized</desc>
893                     <p-qual kind="static" name="regexp" type="Regexp">00:50:56:[0-3][0-9A-Fa-f](:[0-9A-Fa-f]{2}){2}</p-qual>
894                 </p-param>
895                 <p-param name="network">
896                     <desc>Network on which attach the virtual network interface</desc>
897                     <p-qual kind="ognl" name="dataBinding" type="VC:DistributedVirtualPortgroup">GetAction("com.vmware.library.vc.vm.network","getNetworkForGivenNic").call(#vm, 1)</p-qual>
898                     <p-qual kind="static" name="show-select-as" type="string">list</p-qual>
899                     <p-qual kind="ognl" name="linkedEnumeration" type="Array/VC:DistributedVirtualPortgroup">GetAction("com.vmware.library.vc.network","getNetworkForResourcePoolHostVm").call( #pool , #host , #vm )</p-qual>
900                 </p-param>
901             </p-group>
902             <p-group>
903                 <title>Use DHCP</title>
904                 <p-param name="dhcp">
905                     <desc>Use a DHCP server to configure the virtual network adapter</desc>
906                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
907                 </p-param>
908             </p-group>
909             <p-group>
910                 <title>Fixed IP</title>
911                 <p-qual kind="ognl" name="notVisible" type="boolean">#dhcp</p-qual>
912                 <p-param name="ipAddress">
913                     <desc>Fixed, valid IP address</desc>
914                     <p-qual kind="static" name="regexp" type="Regexp">\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b</p-qual>
915                 </p-param>
916                 <p-param name="subnetMask">
917                     <desc>Subnet mask for this virtual network adapter</desc>
918                     <p-qual kind="static" name="regexp" type="Regexp">\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b</p-qual>
919                 </p-param>
920                 <p-param name="gateway">
921                     <desc>List of gateways, in order of preference</desc>
922                 </p-param>
923             </p-group>
924             <p-group>
925                 <title>Information Settable with or without DHCP</title>
926                 <p-param name="dnsDomain">
927                     <desc>DNS domain suffix such as vmware.com</desc>
928                 </p-param>
929                 <p-param name="dnsServerList">
930                     <desc>List of DNS servers for a virtual network adapter with a static IP address</desc>
931                 </p-param>
932             </p-group>
933         </p-step>
934     </presentation>
935 </workflow>