første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / uio / VirtProv / clone_vm_from_rest.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="item7" object-name="Workflow:name=generic" id="e7764fb3-d858-4336-af95-2295aca15ce8" version="3.0.16" api-version="3.1.0" allowed-operations="fve" restartMode="1" resumeFromFailedMode="0">
3     <display-name>clone_vm_from_rest</display-name>
4
5     <description>
6 Main vCo from REST flow used by the python module vmware.py
7
8 Flow: 
9   
10   - Clone a virtual server from template
11   - Sysprep
12   - Join AD
13   - Exec extra powershell scripts / bash scripts (if cloning linux)
14   - Add extra disk if requested
15     </description>
16
17     <position x="285.0" y="163.59090909090907"/>
18
19     <input>
20         <param name="name" type="string">
21             <description>Virtual machine currently being processed</description>
22         </param>
23         <param name="cluster" type="string"/>
24         <param name="folder" type="string">
25             <description>Folder to store the new VM</description>
26         </param>
27         <param name="template_name" type="string"/>
28         <param name="viktighet" type="number">
29             <description>Resource group to add VM into</description>
30         </param>
31         <param name="vlan_id" type="number">
32             <description>vlanid</description>
33         </param>
34         <param name="vmDiskSize" type="number">
35             <description>Size of virtual disk in GB</description>
36         </param>
37         <param name="vmMemorySize" type="number">
38             <description>Virtual machine's memory size in MB</description>
39         </param>
40         <param name="vmNbOfCpus" type="number">
41             <description>Number of virtual processors</description>
42         </param>
43         <param name="vlan_name" type="string">
44             <description>Vlan descriptive name</description>
45         </param>
46         <param name="osname" type="string">
47             <description>Navn på OS</description>
48         </param>
49         <param name="ad_domain_id" type="number">
50             <description>Ad omain id from database. If &gt; 0 add vm in AD</description>
51         </param>
52         <param name="ad_domain_name" type="string">
53             <description>Ad domain to join</description>
54         </param>
55         <param name="datacenter" type="string"/>
56         <param name="ipv4gateway" type="Array/string">
57             <description>(Optional) List of gateways, in order of preference</description>
58         </param>
59         <param name="ipv4Address" type="string">
60             <description>Fixed valid IPv4 address</description>
61         </param>
62         <param name="ipv4subnetMask" type="string">
63             <description>(Optional) Subnet mask for this virtual network adapter</description>
64         </param>
65         <param name="macAddress" type="string">
66             <description>Dersom undef, så defineres ikke macAddress</description>
67         </param>
68         <param name="windows_roles" type="Array/string">
69             <description>Windows roles. Other workflow fetches roles from database</description>
70         </param>
71         <param name="ipv4dnsServerList" type="Array/string">
72             <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
73         </param>
74         <param name="ipv6gateway" type="string"/>
75         <param name="ipv6prefixlen" type="number"/>
76         <param name="ipv6Address" type="string"/>
77         <param name="ipv6dnsServerList" type="Array/string"/>
78     </input>
79
80     <attrib name="errorCode" type="string" read-only="false">
81         <value encoded="n"/>
82         <description>Error code</description>
83     </attrib>
84     <attrib name="vmFolder" type="VC:VmFolder" read-only="false">
85         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/group-v84'&amp;dunesName='VC:VmFolder'</value>
86         <description>Virtual machine folder</description>
87     </attrib>
88     <attrib name="vmResourcePool" type="VC:ResourcePool" read-only="false">
89         <value encoded="n">__NULL__</value>
90         <description>Resource pool in which to create the virtual machine</description>
91     </attrib>
92     <attrib name="vmHost" type="VC:HostSystem" read-only="false">
93         <value encoded="n">__NULL__</value>
94         <description>Host on which to create the virtual machine</description>
95     </attrib>
96     <attrib name="vmNetwork" type="VC:DistributedVirtualPortgroup" read-only="false">
97         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/dvportgroup-47'&amp;dunesName='VC:DistributedVirtualPortgroup'</value>
98         <description>The network to connect to</description>
99     </attrib>
100     <attrib name="epostliste" type="string" read-only="false">
101         <value encoded="n"/>
102         <description>Mail alias for ny VM</description>
103     </attrib>
104     <attrib name="database" type="SQL:Database" read-only="false">
105         <value encoded="n">__NULL__</value>
106         <description>Pointer to database</description>
107     </attrib>
108     <attrib name="mailto1" type="string" read-only="false">
109         <value encoded="n"/>
110         <description>Default mailto parameter</description>
111     </attrib>
112     <attrib name="smtp_server1" type="string" read-only="false">
113         <value encoded="n"/>
114         <description>Default SMTP server</description>
115     </attrib>
116     <attrib name="smtp_port1" type="string" read-only="false">
117         <value encoded="n"/>
118         <description>Default SMTP port</description>
119     </attrib>
120     <attrib name="VIM" type="VC:SdkConnection" read-only="false">
121         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no'&amp;dunesName='VC:SdkConnection'</value>
122         <description>Pointer to Vcenter object</description>
123     </attrib>
124     <attrib name="template" type="VC:VirtualMachine" read-only="false">
125         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/vm-82'&amp;dunesName='VC:VirtualMachine'</value>
126         <description>Virtual machine to clone</description>
127     </attrib>
128     <attrib name="datastore" type="VC:Datastore" read-only="false">
129         <value encoded="n">__NULL__</value>
130         <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
131     </attrib>
132     <attrib name="dnsDomain" type="string" read-only="false">
133         <value encoded="n">tsd.usit.no</value>
134         <description>(Optional) DNS domain suffix such as vmware.com</description>
135     </attrib>
136     <attrib name="fullName" type="string" read-only="false">
137         <value encoded="n">Universitetet i Oslo</value>
138         <description>User's full name</description>
139     </attrib>
140     <attrib name="orgName" type="string" read-only="false">
141         <value encoded="n">UiO</value>
142         <description>Organization name</description>
143     </attrib>
144     <attrib name="computerName" type="string" read-only="false">
145         <value encoded="n"/>
146         <description>Name of the new VM</description>
147     </attrib>
148     <attrib name="errorStatus" type="number" read-only="false">
149         <value encoded="n">13.0</value>
150         <description>VM status. Default 4 or 999 for deleted</description>
151     </attrib>
152     <attrib name="newVM" type="VC:VirtualMachine" read-only="false">
153         <value encoded="n">__NULL__</value>
154         <description>The newly created virtual machine</description>
155     </attrib>
156     <attrib name="os_full_name" type="string" read-only="false">
157         <value encoded="n"/>
158     </attrib>
159     <attrib name="status_start_cloning" type="number" read-only="false">
160         <value encoded="n">10.0</value>
161         <description>VM status. Default 4 or 999 for deleted</description>
162     </attrib>
163     <attrib name="message_start_cloning" type="string" read-only="false">
164         <value encoded="n">Starting to clone VM</value>
165         <description>Message to log to info or error</description>
166     </attrib>
167     <attrib name="status_finished" type="number" read-only="false">
168         <value encoded="n">4.0</value>
169         <description>VM status. Default 4 or 999 for deleted</description>
170     </attrib>
171     <attrib name="vmPassword" type="SecureString" read-only="false">
172         <value encoded="n">12AE4ED65E7787216FD6F074931532633734F3534A85DE3EBD93C7671CDC2A140DF056C8810B8C79FD2C985F605987495D9</value>
173     </attrib>
174     <attrib name="powerOn" type="boolean" read-only="false">
175         <value encoded="n">true</value>
176         <description>Specifies whether or not the new virtual machine should be powered on after creation</description>
177     </attrib>
178     <attrib name="doSysprep" type="boolean" read-only="false">
179         <value encoded="n">true</value>
180         <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
181     </attrib>
182     <attrib name="dhcp" type="boolean" read-only="false">
183         <value encoded="n">false</value>
184         <description>Use a DHCP server to configure the virtual network adapter</description>
185     </attrib>
186     <attrib name="diskIndex" type="number" read-only="false">
187         <value encoded="n">1.0</value>
188         <description>Disk index</description>
189     </attrib>
190     <attrib name="diskMode" type="VC:VirtualDiskMode" read-only="false">
191         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='persistent'&amp;dunesName='VC:VirtualDiskMode'</value>
192         <description>Disk persistence mode</description>
193     </attrib>
194     <attrib name="scsiBusNumber" type="number" read-only="false">
195         <value encoded="n">0.0</value>
196         <description>SCSI controller bus number</description>
197     </attrib>
198     <attrib name="thinProvisioned" type="boolean" read-only="false">
199         <value encoded="n">false</value>
200         <description>Use thin provisioning?</description>
201     </attrib>
202     <attrib name="allocate_disk_space" type="number" read-only="false">
203         <value encoded="n">__NULL__</value>
204         <description>Size of virtual disk in GB</description>
205     </attrib>
206     <attrib name="project" type="string" read-only="false">
207         <value encoded="n"/>
208     </attrib>
209     <attrib name="ldapPath" type="string" read-only="false">
210         <value encoded="n"/>
211     </attrib>
212
213     <workflow-item name="item6" out-name="item5" catch-name="item10" throw-bind-name="errorCode" type="task">
214         <display-name>get_network_interface</display-name>
215
216         <script encoded="false">
217 System.log("VM = &gt; "+activeVM);
218
219
220 if (vmDiskSize == -1) {
221         allocate_disk_space=60;
222 }
223
224 var clusters = System.getModule("com.vmware.library.vc.cluster").getAllClusterComputeResourceForVimHost(VIM)
225 var computer=activeVM.split(".");
226 computerName=computer[0];
227
228 for each (var cl in clusters) {
229         if (cl.name != cluster) {
230                 break;
231         }
232
233         // Finn cluster noder   
234         for each (vmHost in cl.host) {
235                 if (vmNetwork &amp;&amp; vmResourcePool) {
236                         break;
237                 }
238                 System.log(vmHost.name);
239                 for each (vlan in vmHost.network) {
240                         if(vlan.config.defaultPortConfig.vlan instanceof VcVmwareDistributedVirtualSwitchVlanIdSpec){
241                                 if (vlan_name == vlan.config.name) {
242                                         vmNetwork=vlan;
243                                         System.log('VLAN name =&gt; '+vlan.config.name);
244                                         var pools = System.getModule("com.vmware.library.vc.resourcePool").getValidResourcePoolForNetwork(vmNetwork);
245                                         for each (pool in pools) {
246                                                 if (pool.name == "sydr-kat"+viktighet) {
247                                                         vmResourcePool=pool;
248                                                         System.log("Ressurs poool = "+pool.name);
249                                                         break;
250                                                 }
251                                         }
252                                         break;
253                                 }
254                         }
255                 }
256         }
257 }
258         </script>
259
260         <in-binding>
261             <bind name="activeVM" type="string" export-name="name">
262                 <description>Virtual machine currently being processed</description>
263             </bind>
264             <bind name="cluster" type="string" export-name="cluster"/>
265             <bind name="folder" type="string" export-name="folder"/>
266             <bind name="template_name" type="string" export-name="template_name"/>
267             <bind name="viktighet" type="number" export-name="viktighet"/>
268             <bind name="VIM" type="VC:SdkConnection" export-name="VIM">
269                 <description>Virtual Senter Server</description>
270             </bind>
271             <bind name="vlan_id" type="number" export-name="vlan_id"/>
272             <bind name="vmDiskSize" type="number" export-name="vmDiskSize">
273                 <description>Size of virtual disk in GB</description>
274             </bind>
275             <bind name="vmMemorySize" type="number" export-name="vmMemorySize">
276                 <description>Virtual machine's memory size in MB</description>
277             </bind>
278             <bind name="vmNbOfCpus" type="number" export-name="vmNbOfCpus">
279                 <description>Number of virtual processors</description>
280             </bind>
281             <bind name="vlan_name" type="string" export-name="vlan_name">
282                 <description>Vlan descriptive name</description>
283             </bind>
284         </in-binding>
285
286         <out-binding>
287             <bind name="vmFolder" type="VC:VmFolder" export-name="vmFolder">
288                 <description>Virtual machine folder</description>
289             </bind>
290             <bind name="allocate_disk_space" type="number" export-name="allocate_disk_space"/>
291             <bind name="vmResourcePool" type="VC:ResourcePool" export-name="vmResourcePool">
292                 <description>Resource pool in which to create the virtual machine</description>
293             </bind>
294             <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork">
295                 <description>The network to connect to</description>
296             </bind>
297             <bind name="vmHost" type="VC:HostSystem" export-name="vmHost">
298                 <description>Host on which to create the virtual machine</description>
299             </bind>
300             <bind name="computerName" type="string" export-name="computerName"/>
301         </out-binding>
302
303         <description>Find interface with requested VLAN</description>
304
305         <position x="884.5" y="273.59090909090907"/>
306     </workflow-item>
307
308     <workflow-item name="item7" out-name="item3" type="link" linked-workflow-id="1f0fc470-006c-4c15-a3b9-95e2e7540f22">
309         <display-name>global_parameters</display-name>
310
311         <in-binding/>
312
313         <out-binding>
314             <bind name="mailto" type="string" export-name="mailto1"/>
315             <bind name="smtp_server" type="string" export-name="smtp_server1"/>
316             <bind name="smtp_port" type="string" export-name="smtp_port1"/>
317             <bind name="database" type="SQL:Database" export-name="database"/>
318             <bind name="vmPassword" type="SecureString" export-name="vmPassword"/>
319         </out-binding>
320
321         <position x="245.0" y="273.59090909090907"/>
322     </workflow-item>
323
324     <workflow-item name="item14" out-name="item9" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="1f459776-8603-4336-ae18-85672d369909">
325         <display-name>get_optimal_datastore</display-name>
326
327         <in-binding>
328             <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork"/>
329             <bind name="diskspace" type="number" export-name="allocate_disk_space"/>
330         </in-binding>
331
332         <out-binding>
333             <bind name="datastore1" type="VC:Datastore" export-name="datastore"/>
334         </out-binding>
335
336         <description>
337 Find datastore with most free disk, and space for the VMs disk
338
339 Input parameter is network object, and GB of required space
340         </description>
341
342         <position x="884.5" y="100.86363636363636"/>
343     </workflow-item>
344
345     <workflow-item name="item10" out-name="item0" type="link" linked-workflow-id="fac19258-528f-4e75-a341-6242a16246b6">
346         <display-name>set_db_state</display-name>
347
348         <in-binding>
349             <bind name="vm" type="string" export-name="name">
350                 <description>Navn på vm som skal ha oppdatert status</description>
351             </bind>
352             <bind name="status" type="number" export-name="errorStatus">
353                 <description>VM status. Default 4 or 999 for deleted</description>
354             </bind>
355             <bind name="message" type="string" export-name="errorCode">
356                 <description>Message to log to info or error</description>
357             </bind>
358             <bind name="virtualMachine" type="VC:VirtualMachine" export-name="newVM"/>
359             <bind name="project_folder" type="string" export-name="folder"/>
360         </in-binding>
361
362         <out-binding/>
363
364         <description>Set a new state for VM in database</description>
365
366         <position x="544.5" y="155.4090909090909"/>
367     </workflow-item>
368
369     <workflow-item name="item15" out-name="item1" type="link" linked-workflow-id="e8ecbc5e-964e-4811-84d6-76ff12d69d72">
370         <display-name>vm_ready_email</display-name>
371
372         <in-binding>
373             <bind name="vm" type="VC:VirtualMachine" export-name="newVM"/>
374             <bind name="viktighet" type="number" export-name="viktighet"/>
375             <bind name="datacenter" type="string" export-name="datacenter"/>
376             <bind name="cluster" type="string" export-name="cluster"/>
377             <bind name="disksize" type="number" export-name="vmDiskSize"/>
378             <bind name="num_cpus" type="number" export-name="vmNbOfCpus"/>
379             <bind name="memory" type="number" export-name="vmMemorySize"/>
380             <bind name="osname" type="string" export-name="os_full_name"/>
381             <bind name="epostliste" type="string" export-name="epostliste"/>
382         </in-binding>
383
384         <out-binding/>
385
386         <description>Logger hendelser som skjer til databasen. Også mulig å logge til email dersom variablen enable_mail settes til true</description>
387
388         <position x="164.5" y="28.136363636363633"/>
389     </workflow-item>
390
391     <workflow-item name="item4" out-name="item15" type="link" linked-workflow-id="fac19258-528f-4e75-a341-6242a16246b6">
392         <display-name>Set status = 4</display-name>
393
394         <in-binding>
395             <bind name="vm" type="string" export-name="name">
396                 <description>Navn på vm som skal ha oppdatert status</description>
397             </bind>
398             <bind name="status" type="number" export-name="status_finished">
399                 <description>VM status. Default 4 or 999 for deleted</description>
400             </bind>
401             <bind name="message" type="string" export-name="message_start_cloning">
402                 <description>Message to log to info or error</description>
403             </bind>
404             <bind name="virtualMachine" type="VC:VirtualMachine" export-name="newVM"/>
405             <bind name="project_folder" type="string" export-name="project"/>
406         </in-binding>
407
408         <out-binding/>
409
410         <description>Set a new state for VM in database</description>
411
412         <position x="444.5" y="28.136363636363633"/>
413     </workflow-item>
414
415     <workflow-item name="item5" out-name="item14" type="link" linked-workflow-id="bb56f2b9-97b8-4c32-829f-b92a9a0fd53e">
416         <display-name>get_template</display-name>
417
418         <in-binding>
419             <bind name="vmName" type="string" export-name="template_name"/>
420             <bind name="vmHost" type="VC:HostSystem" export-name="vmHost"/>
421             <bind name="currState" type="number" export-name="status_start_cloning"/>
422         </in-binding>
423
424         <out-binding>
425             <bind name="autoFolder" type="VC:VmFolder" export-name="vmFolder"/>
426             <bind name="template" type="VC:VirtualMachine" export-name="template"/>
427             <bind name="osname" type="string" export-name="os_full_name"/>
428         </out-binding>
429
430         <description>Find a template in the datacenter the VM should be placed in.</description>
431
432         <position x="884.5" y="191.77272727272725"/>
433     </workflow-item>
434
435     <workflow-item name="item9" out-name="item4" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="eb00c75d-3403-4fb9-a3ae-a07e45c20bf0">
436         <display-name>clone_lin_win</display-name>
437
438         <in-binding>
439             <bind name="folder" type="VC:VmFolder" export-name="vmFolder">
440                 <description>Virtual machine folder</description>
441             </bind>
442             <bind name="name" type="string" export-name="name">
443                 <description>New virtual machine name</description>
444             </bind>
445             <bind name="vm" type="VC:VirtualMachine" export-name="template">
446                 <description>Virtual machine to clone</description>
447             </bind>
448             <bind name="powerOn" type="boolean" export-name="powerOn">
449                 <description>Specifies whether or not the new virtual machine should be powered on after creation</description>
450             </bind>
451             <bind name="datastore" type="VC:Datastore" export-name="datastore">
452                 <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
453             </bind>
454             <bind name="host" type="VC:HostSystem" export-name="vmHost">
455                 <description>(Optional) Host on which to create the virtual machine</description>
456             </bind>
457             <bind name="pool" type="VC:ResourcePool" export-name="vmResourcePool">
458                 <description>(Optional) Resource pool in which to create the virtual machine</description>
459             </bind>
460             <bind name="doSysprep" type="boolean" export-name="doSysprep">
461                 <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
462             </bind>
463             <bind name="clientName" type="string" export-name="computerName">
464                 <description>Name or prefix name of the Linux client</description>
465             </bind>
466             <bind name="network" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork">
467                 <description>Network on which to attach the virtual network interface</description>
468             </bind>
469             <bind name="dnsServerList" type="Array/string" export-name="ipv4dnsServerList">
470                 <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
471             </bind>
472             <bind name="dnsDomain" type="string" export-name="dnsDomain">
473                 <description>(Optional) DNS domain suffix such as vmware.com</description>
474             </bind>
475             <bind name="dhcp" type="boolean" export-name="dhcp">
476                 <description>Use a DHCP server to configure the virtual network adapter</description>
477             </bind>
478             <bind name="gateway" type="Array/string" export-name="ipv4gateway">
479                 <description>(Optional) List of gateways, in order of preference</description>
480             </bind>
481             <bind name="ipAddress" type="string" export-name="ipv4Address">
482                 <description>Fixed, valid IP address</description>
483             </bind>
484             <bind name="macAddress" type="string" export-name="macAddress">
485                 <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>
486             </bind>
487             <bind name="subnetMask" type="string" export-name="ipv4subnetMask">
488                 <description>[Optional] Subnet mask for this virtual network adapter</description>
489             </bind>
490             <bind name="diskIndex" type="number" export-name="diskIndex">
491                 <description>Disk index</description>
492             </bind>
493             <bind name="diskSize" type="number" export-name="vmDiskSize">
494                 <description>Disk size (in GB)</description>
495             </bind>
496             <bind name="diskMode" type="VC:VirtualDiskMode" export-name="diskMode">
497                 <description>Disk persistence mode</description>
498             </bind>
499             <bind name="scsiBusNumber" type="number" export-name="scsiBusNumber">
500                 <description>SCSI controller bus number</description>
501             </bind>
502             <bind name="thinProvisioned" type="boolean" export-name="thinProvisioned">
503                 <description>Use thin provisioning?</description>
504             </bind>
505             <bind name="fullName" type="string" export-name="fullName">
506                 <description>User's full name</description>
507             </bind>
508             <bind name="orgName" type="string" export-name="orgName">
509                 <description>Organization name</description>
510             </bind>
511             <bind name="windows_roles" type="Array/string" export-name="windows_roles">
512                 <description>Windows roles. Other workflow fetches roles from database</description>
513             </bind>
514             <bind name="vlan_name" type="string" export-name="vlan_name">
515                 <description>Vlan descriptive name</description>
516             </bind>
517             <bind name="ad_domain_id" type="number" export-name="ad_domain_id"/>
518             <bind name="ad_domain_name" type="string" export-name="ad_domain_name"/>
519             <bind name="vmPassword" type="SecureString" export-name="vmPassword"/>
520             <bind name="osname" type="string" export-name="osname"/>
521             <bind name="ipv6gateway" type="string" export-name="ipv6gateway"/>
522             <bind name="ipv6dnsServerList" type="Array/string" export-name="ipv6dnsServerList"/>
523             <bind name="ipv6address" type="string" export-name="ipv6Address"/>
524             <bind name="ipv6Prefixlen" type="number" export-name="ipv6prefixlen"/>
525             <bind name="memory" type="number" export-name="vmMemorySize"/>
526             <bind name="vcpu" type="number" export-name="vmNbOfCpus"/>
527         </in-binding>
528
529         <out-binding>
530             <bind name="newVM1" type="VC:VirtualMachine" export-name="newVM"/>
531         </out-binding>
532
533         <description>
534 Create a clone of the template and configure the clone.
535
536 This will also configure any 3'rd party systems, like AD etc.
537         </description>
538
539         <position x="884.5" y="28.136363636363633"/>
540     </workflow-item>
541
542     <workflow-item name="item1" type="end" end-mode="0">
543         <position x="204.5" y="81.77272727272727"/>
544     </workflow-item>
545
546     <workflow-item name="item0" throw-bind-name="errorCode" type="end" end-mode="1">
547         <position x="464.5" y="145.4090909090909"/>
548     </workflow-item>
549
550     <workflow-item name="item2" out-name="item6" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="a5c7285f-1b6c-45e6-a4cb-3b2881b54cb0">
551         <display-name>get_project</display-name>
552
553         <in-binding>
554             <bind name="computerName" type="string" export-name="name"/>
555         </in-binding>
556
557         <out-binding>
558             <bind name="project" type="string" export-name="project"/>
559             <bind name="ldapPath" type="string" export-name="ldapPath"/>
560         </out-binding>
561
562         <description>Small flow used to get ldapPath for AD object. Also returns project name.</description>
563
564         <position x="524.5" y="273.59090909090907"/>
565     </workflow-item>
566
567     <workflow-item name="item3" out-name="item2" type="link" linked-workflow-id="e606a877-eb2a-4ff8-ba1c-2e48aba0e869">
568         <display-name>generate_password</display-name>
569
570         <in-binding/>
571
572         <out-binding>
573             <bind name="passwd" type="SecureString" export-name="vmPassword"/>
574         </out-binding>
575
576         <description>Generate a dynamic password for the vm's Administrator account</description>
577
578         <position x="385.0" y="274.09090909090907"/>
579     </workflow-item>
580
581     <presentation>
582         <p-param name="name">
583             <desc>Virtual machine currently being processed</desc>
584         </p-param>
585         <p-param name="cluster">
586             <desc>cluster</desc>
587         </p-param>
588         <p-param name="folder">
589             <desc>Folder to store the new VM</desc>
590         </p-param>
591         <p-param name="template_name">
592             <desc>template_name</desc>
593         </p-param>
594         <p-param name="viktighet">
595             <desc>Resource group to add VM into</desc>
596         </p-param>
597         <p-param name="vlan_id">
598             <desc>vlanid</desc>
599         </p-param>
600         <p-param name="vmDiskSize">
601             <desc>Size of virtual disk in GB</desc>
602         </p-param>
603         <p-param name="vmMemorySize">
604             <desc>Virtual machine's memory size in MB</desc>
605         </p-param>
606         <p-param name="vmNbOfCpus">
607             <desc>Number of virtual processors</desc>
608         </p-param>
609         <p-param name="vlan_name">
610             <desc>Vlan descriptive name</desc>
611         </p-param>
612         <p-param name="osname">
613             <desc>Navn på OS</desc>
614         </p-param>
615         <p-param name="ad_domain_id">
616             <desc>Ad omain id from database. If &gt; 0 add vm in AD</desc>
617         </p-param>
618         <p-param name="ad_domain_name">
619             <desc>Ad domain to join</desc>
620         </p-param>
621         <p-param name="datacenter">
622             <desc>datacenter</desc>
623         </p-param>
624         <p-param name="ipv4gateway">
625             <desc>(Optional) List of gateways, in order of preference</desc>
626         </p-param>
627         <p-param name="ipv4Address">
628             <desc>Fixed valid IP address</desc>
629         </p-param>
630         <p-param name="ipv4subnetMask">
631             <desc>(Optional) Subnet mask for this virtual network adapter</desc>
632         </p-param>
633         <p-param name="macAddress">
634             <desc>Dersom undef, så defineres ikke macAddress</desc>
635         </p-param>
636         <p-param name="windows_roles">
637             <desc>Windows roles. Other workflow fetches roles from database</desc>
638         </p-param>
639         <p-param name="ipv4dnsServerList">
640             <desc>(Optional) List of DNS servers for a virtual network adapter with a static IP address</desc>
641         </p-param>
642         <p-param name="ipv6gateway">
643             <desc>ipv6gateway</desc>
644         </p-param>
645         <p-param name="ipv6prefixlen">
646             <desc>ipv6prefixlen</desc>
647         </p-param>
648         <p-param name="ipv6Address">
649             <desc>ipv6Address</desc>
650         </p-param>
651         <p-param name="ipv6dnsServerList">
652             <desc>ipv6dnsServerList</desc>
653         </p-param>
654     </presentation>
655 </workflow>