--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <display-name>clone_vm_from_rest</display-name>
+
+ <description>
+Main vCo from REST flow used by the python module vmware.py
+
+Flow:
+
+ - Clone a virtual server from template
+ - Sysprep
+ - Join AD
+ - Exec extra powershell scripts / bash scripts (if cloning linux)
+ - Add extra disk if requested
+ </description>
+
+ <position x="285.0" y="163.59090909090907"/>
+
+ <input>
+ <param name="name" type="string">
+ <description>Virtual machine currently being processed</description>
+ </param>
+ <param name="cluster" type="string"/>
+ <param name="folder" type="string">
+ <description>Folder to store the new VM</description>
+ </param>
+ <param name="template_name" type="string"/>
+ <param name="viktighet" type="number">
+ <description>Resource group to add VM into</description>
+ </param>
+ <param name="vlan_id" type="number">
+ <description>vlanid</description>
+ </param>
+ <param name="vmDiskSize" type="number">
+ <description>Size of virtual disk in GB</description>
+ </param>
+ <param name="vmMemorySize" type="number">
+ <description>Virtual machine's memory size in MB</description>
+ </param>
+ <param name="vmNbOfCpus" type="number">
+ <description>Number of virtual processors</description>
+ </param>
+ <param name="vlan_name" type="string">
+ <description>Vlan descriptive name</description>
+ </param>
+ <param name="osname" type="string">
+ <description>Navn på OS</description>
+ </param>
+ <param name="ad_domain_id" type="number">
+ <description>Ad omain id from database. If > 0 add vm in AD</description>
+ </param>
+ <param name="ad_domain_name" type="string">
+ <description>Ad domain to join</description>
+ </param>
+ <param name="datacenter" type="string"/>
+ <param name="ipv4gateway" type="Array/string">
+ <description>(Optional) List of gateways, in order of preference</description>
+ </param>
+ <param name="ipv4Address" type="string">
+ <description>Fixed valid IPv4 address</description>
+ </param>
+ <param name="ipv4subnetMask" type="string">
+ <description>(Optional) Subnet mask for this virtual network adapter</description>
+ </param>
+ <param name="macAddress" type="string">
+ <description>Dersom undef, så defineres ikke macAddress</description>
+ </param>
+ <param name="windows_roles" type="Array/string">
+ <description>Windows roles. Other workflow fetches roles from database</description>
+ </param>
+ <param name="ipv4dnsServerList" type="Array/string">
+ <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
+ </param>
+ <param name="ipv6gateway" type="string"/>
+ <param name="ipv6prefixlen" type="number"/>
+ <param name="ipv6Address" type="string"/>
+ <param name="ipv6dnsServerList" type="Array/string"/>
+ </input>
+
+ <attrib name="errorCode" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Error code</description>
+ </attrib>
+ <attrib name="vmFolder" type="VC:VmFolder" read-only="false">
+ <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/group-v84'&dunesName='VC:VmFolder'</value>
+ <description>Virtual machine folder</description>
+ </attrib>
+ <attrib name="vmResourcePool" type="VC:ResourcePool" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>Resource pool in which to create the virtual machine</description>
+ </attrib>
+ <attrib name="vmHost" type="VC:HostSystem" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>Host on which to create the virtual machine</description>
+ </attrib>
+ <attrib name="vmNetwork" type="VC:DistributedVirtualPortgroup" read-only="false">
+ <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/dvportgroup-47'&dunesName='VC:DistributedVirtualPortgroup'</value>
+ <description>The network to connect to</description>
+ </attrib>
+ <attrib name="epostliste" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Mail alias for ny VM</description>
+ </attrib>
+ <attrib name="database" type="SQL:Database" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>Pointer to database</description>
+ </attrib>
+ <attrib name="mailto1" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Default mailto parameter</description>
+ </attrib>
+ <attrib name="smtp_server1" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Default SMTP server</description>
+ </attrib>
+ <attrib name="smtp_port1" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Default SMTP port</description>
+ </attrib>
+ <attrib name="VIM" type="VC:SdkConnection" read-only="false">
+ <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no'&dunesName='VC:SdkConnection'</value>
+ <description>Pointer to Vcenter object</description>
+ </attrib>
+ <attrib name="template" type="VC:VirtualMachine" read-only="false">
+ <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='tsd-vcsa.tsd.usit.no/vm-82'&dunesName='VC:VirtualMachine'</value>
+ <description>Virtual machine to clone</description>
+ </attrib>
+ <attrib name="datastore" type="VC:Datastore" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
+ </attrib>
+ <attrib name="dnsDomain" type="string" read-only="false">
+ <value encoded="n">tsd.usit.no</value>
+ <description>(Optional) DNS domain suffix such as vmware.com</description>
+ </attrib>
+ <attrib name="fullName" type="string" read-only="false">
+ <value encoded="n">Universitetet i Oslo</value>
+ <description>User's full name</description>
+ </attrib>
+ <attrib name="orgName" type="string" read-only="false">
+ <value encoded="n">UiO</value>
+ <description>Organization name</description>
+ </attrib>
+ <attrib name="computerName" type="string" read-only="false">
+ <value encoded="n"/>
+ <description>Name of the new VM</description>
+ </attrib>
+ <attrib name="errorStatus" type="number" read-only="false">
+ <value encoded="n">13.0</value>
+ <description>VM status. Default 4 or 999 for deleted</description>
+ </attrib>
+ <attrib name="newVM" type="VC:VirtualMachine" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>The newly created virtual machine</description>
+ </attrib>
+ <attrib name="os_full_name" type="string" read-only="false">
+ <value encoded="n"/>
+ </attrib>
+ <attrib name="status_start_cloning" type="number" read-only="false">
+ <value encoded="n">10.0</value>
+ <description>VM status. Default 4 or 999 for deleted</description>
+ </attrib>
+ <attrib name="message_start_cloning" type="string" read-only="false">
+ <value encoded="n">Starting to clone VM</value>
+ <description>Message to log to info or error</description>
+ </attrib>
+ <attrib name="status_finished" type="number" read-only="false">
+ <value encoded="n">4.0</value>
+ <description>VM status. Default 4 or 999 for deleted</description>
+ </attrib>
+ <attrib name="vmPassword" type="SecureString" read-only="false">
+ <value encoded="n">12AE4ED65E7787216FD6F074931532633734F3534A85DE3EBD93C7671CDC2A140DF056C8810B8C79FD2C985F605987495D9</value>
+ </attrib>
+ <attrib name="powerOn" type="boolean" read-only="false">
+ <value encoded="n">true</value>
+ <description>Specifies whether or not the new virtual machine should be powered on after creation</description>
+ </attrib>
+ <attrib name="doSysprep" type="boolean" read-only="false">
+ <value encoded="n">true</value>
+ <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
+ </attrib>
+ <attrib name="dhcp" type="boolean" read-only="false">
+ <value encoded="n">false</value>
+ <description>Use a DHCP server to configure the virtual network adapter</description>
+ </attrib>
+ <attrib name="diskIndex" type="number" read-only="false">
+ <value encoded="n">1.0</value>
+ <description>Disk index</description>
+ </attrib>
+ <attrib name="diskMode" type="VC:VirtualDiskMode" read-only="false">
+ <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='persistent'&dunesName='VC:VirtualDiskMode'</value>
+ <description>Disk persistence mode</description>
+ </attrib>
+ <attrib name="scsiBusNumber" type="number" read-only="false">
+ <value encoded="n">0.0</value>
+ <description>SCSI controller bus number</description>
+ </attrib>
+ <attrib name="thinProvisioned" type="boolean" read-only="false">
+ <value encoded="n">false</value>
+ <description>Use thin provisioning?</description>
+ </attrib>
+ <attrib name="allocate_disk_space" type="number" read-only="false">
+ <value encoded="n">__NULL__</value>
+ <description>Size of virtual disk in GB</description>
+ </attrib>
+ <attrib name="project" type="string" read-only="false">
+ <value encoded="n"/>
+ </attrib>
+ <attrib name="ldapPath" type="string" read-only="false">
+ <value encoded="n"/>
+ </attrib>
+
+ <workflow-item name="item6" out-name="item5" catch-name="item10" throw-bind-name="errorCode" type="task">
+ <display-name>get_network_interface</display-name>
+
+ <script encoded="false">
+System.log("VM = > "+activeVM);
+
+
+if (vmDiskSize == -1) {
+ allocate_disk_space=60;
+}
+
+var clusters = System.getModule("com.vmware.library.vc.cluster").getAllClusterComputeResourceForVimHost(VIM)
+var computer=activeVM.split(".");
+computerName=computer[0];
+
+for each (var cl in clusters) {
+ if (cl.name != cluster) {
+ break;
+ }
+
+ // Finn cluster noder
+ for each (vmHost in cl.host) {
+ if (vmNetwork && vmResourcePool) {
+ break;
+ }
+ System.log(vmHost.name);
+ for each (vlan in vmHost.network) {
+ if(vlan.config.defaultPortConfig.vlan instanceof VcVmwareDistributedVirtualSwitchVlanIdSpec){
+ if (vlan_name == vlan.config.name) {
+ vmNetwork=vlan;
+ System.log('VLAN name => '+vlan.config.name);
+ var pools = System.getModule("com.vmware.library.vc.resourcePool").getValidResourcePoolForNetwork(vmNetwork);
+ for each (pool in pools) {
+ if (pool.name == "sydr-kat"+viktighet) {
+ vmResourcePool=pool;
+ System.log("Ressurs poool = "+pool.name);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+}
+ </script>
+
+ <in-binding>
+ <bind name="activeVM" type="string" export-name="name">
+ <description>Virtual machine currently being processed</description>
+ </bind>
+ <bind name="cluster" type="string" export-name="cluster"/>
+ <bind name="folder" type="string" export-name="folder"/>
+ <bind name="template_name" type="string" export-name="template_name"/>
+ <bind name="viktighet" type="number" export-name="viktighet"/>
+ <bind name="VIM" type="VC:SdkConnection" export-name="VIM">
+ <description>Virtual Senter Server</description>
+ </bind>
+ <bind name="vlan_id" type="number" export-name="vlan_id"/>
+ <bind name="vmDiskSize" type="number" export-name="vmDiskSize">
+ <description>Size of virtual disk in GB</description>
+ </bind>
+ <bind name="vmMemorySize" type="number" export-name="vmMemorySize">
+ <description>Virtual machine's memory size in MB</description>
+ </bind>
+ <bind name="vmNbOfCpus" type="number" export-name="vmNbOfCpus">
+ <description>Number of virtual processors</description>
+ </bind>
+ <bind name="vlan_name" type="string" export-name="vlan_name">
+ <description>Vlan descriptive name</description>
+ </bind>
+ </in-binding>
+
+ <out-binding>
+ <bind name="vmFolder" type="VC:VmFolder" export-name="vmFolder">
+ <description>Virtual machine folder</description>
+ </bind>
+ <bind name="allocate_disk_space" type="number" export-name="allocate_disk_space"/>
+ <bind name="vmResourcePool" type="VC:ResourcePool" export-name="vmResourcePool">
+ <description>Resource pool in which to create the virtual machine</description>
+ </bind>
+ <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork">
+ <description>The network to connect to</description>
+ </bind>
+ <bind name="vmHost" type="VC:HostSystem" export-name="vmHost">
+ <description>Host on which to create the virtual machine</description>
+ </bind>
+ <bind name="computerName" type="string" export-name="computerName"/>
+ </out-binding>
+
+ <description>Find interface with requested VLAN</description>
+
+ <position x="884.5" y="273.59090909090907"/>
+ </workflow-item>
+
+ <workflow-item name="item7" out-name="item3" type="link" linked-workflow-id="1f0fc470-006c-4c15-a3b9-95e2e7540f22">
+ <display-name>global_parameters</display-name>
+
+ <in-binding/>
+
+ <out-binding>
+ <bind name="mailto" type="string" export-name="mailto1"/>
+ <bind name="smtp_server" type="string" export-name="smtp_server1"/>
+ <bind name="smtp_port" type="string" export-name="smtp_port1"/>
+ <bind name="database" type="SQL:Database" export-name="database"/>
+ <bind name="vmPassword" type="SecureString" export-name="vmPassword"/>
+ </out-binding>
+
+ <position x="245.0" y="273.59090909090907"/>
+ </workflow-item>
+
+ <workflow-item name="item14" out-name="item9" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="1f459776-8603-4336-ae18-85672d369909">
+ <display-name>get_optimal_datastore</display-name>
+
+ <in-binding>
+ <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork"/>
+ <bind name="diskspace" type="number" export-name="allocate_disk_space"/>
+ </in-binding>
+
+ <out-binding>
+ <bind name="datastore1" type="VC:Datastore" export-name="datastore"/>
+ </out-binding>
+
+ <description>
+Find datastore with most free disk, and space for the VMs disk
+
+Input parameter is network object, and GB of required space
+ </description>
+
+ <position x="884.5" y="100.86363636363636"/>
+ </workflow-item>
+
+ <workflow-item name="item10" out-name="item0" type="link" linked-workflow-id="fac19258-528f-4e75-a341-6242a16246b6">
+ <display-name>set_db_state</display-name>
+
+ <in-binding>
+ <bind name="vm" type="string" export-name="name">
+ <description>Navn på vm som skal ha oppdatert status</description>
+ </bind>
+ <bind name="status" type="number" export-name="errorStatus">
+ <description>VM status. Default 4 or 999 for deleted</description>
+ </bind>
+ <bind name="message" type="string" export-name="errorCode">
+ <description>Message to log to info or error</description>
+ </bind>
+ <bind name="virtualMachine" type="VC:VirtualMachine" export-name="newVM"/>
+ <bind name="project_folder" type="string" export-name="folder"/>
+ </in-binding>
+
+ <out-binding/>
+
+ <description>Set a new state for VM in database</description>
+
+ <position x="544.5" y="155.4090909090909"/>
+ </workflow-item>
+
+ <workflow-item name="item15" out-name="item1" type="link" linked-workflow-id="e8ecbc5e-964e-4811-84d6-76ff12d69d72">
+ <display-name>vm_ready_email</display-name>
+
+ <in-binding>
+ <bind name="vm" type="VC:VirtualMachine" export-name="newVM"/>
+ <bind name="viktighet" type="number" export-name="viktighet"/>
+ <bind name="datacenter" type="string" export-name="datacenter"/>
+ <bind name="cluster" type="string" export-name="cluster"/>
+ <bind name="disksize" type="number" export-name="vmDiskSize"/>
+ <bind name="num_cpus" type="number" export-name="vmNbOfCpus"/>
+ <bind name="memory" type="number" export-name="vmMemorySize"/>
+ <bind name="osname" type="string" export-name="os_full_name"/>
+ <bind name="epostliste" type="string" export-name="epostliste"/>
+ </in-binding>
+
+ <out-binding/>
+
+ <description>Logger hendelser som skjer til databasen. Også mulig å logge til email dersom variablen enable_mail settes til true</description>
+
+ <position x="164.5" y="28.136363636363633"/>
+ </workflow-item>
+
+ <workflow-item name="item4" out-name="item15" type="link" linked-workflow-id="fac19258-528f-4e75-a341-6242a16246b6">
+ <display-name>Set status = 4</display-name>
+
+ <in-binding>
+ <bind name="vm" type="string" export-name="name">
+ <description>Navn på vm som skal ha oppdatert status</description>
+ </bind>
+ <bind name="status" type="number" export-name="status_finished">
+ <description>VM status. Default 4 or 999 for deleted</description>
+ </bind>
+ <bind name="message" type="string" export-name="message_start_cloning">
+ <description>Message to log to info or error</description>
+ </bind>
+ <bind name="virtualMachine" type="VC:VirtualMachine" export-name="newVM"/>
+ <bind name="project_folder" type="string" export-name="project"/>
+ </in-binding>
+
+ <out-binding/>
+
+ <description>Set a new state for VM in database</description>
+
+ <position x="444.5" y="28.136363636363633"/>
+ </workflow-item>
+
+ <workflow-item name="item5" out-name="item14" type="link" linked-workflow-id="bb56f2b9-97b8-4c32-829f-b92a9a0fd53e">
+ <display-name>get_template</display-name>
+
+ <in-binding>
+ <bind name="vmName" type="string" export-name="template_name"/>
+ <bind name="vmHost" type="VC:HostSystem" export-name="vmHost"/>
+ <bind name="currState" type="number" export-name="status_start_cloning"/>
+ </in-binding>
+
+ <out-binding>
+ <bind name="autoFolder" type="VC:VmFolder" export-name="vmFolder"/>
+ <bind name="template" type="VC:VirtualMachine" export-name="template"/>
+ <bind name="osname" type="string" export-name="os_full_name"/>
+ </out-binding>
+
+ <description>Find a template in the datacenter the VM should be placed in.</description>
+
+ <position x="884.5" y="191.77272727272725"/>
+ </workflow-item>
+
+ <workflow-item name="item9" out-name="item4" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="eb00c75d-3403-4fb9-a3ae-a07e45c20bf0">
+ <display-name>clone_lin_win</display-name>
+
+ <in-binding>
+ <bind name="folder" type="VC:VmFolder" export-name="vmFolder">
+ <description>Virtual machine folder</description>
+ </bind>
+ <bind name="name" type="string" export-name="name">
+ <description>New virtual machine name</description>
+ </bind>
+ <bind name="vm" type="VC:VirtualMachine" export-name="template">
+ <description>Virtual machine to clone</description>
+ </bind>
+ <bind name="powerOn" type="boolean" export-name="powerOn">
+ <description>Specifies whether or not the new virtual machine should be powered on after creation</description>
+ </bind>
+ <bind name="datastore" type="VC:Datastore" export-name="datastore">
+ <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
+ </bind>
+ <bind name="host" type="VC:HostSystem" export-name="vmHost">
+ <description>(Optional) Host on which to create the virtual machine</description>
+ </bind>
+ <bind name="pool" type="VC:ResourcePool" export-name="vmResourcePool">
+ <description>(Optional) Resource pool in which to create the virtual machine</description>
+ </bind>
+ <bind name="doSysprep" type="boolean" export-name="doSysprep">
+ <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
+ </bind>
+ <bind name="clientName" type="string" export-name="computerName">
+ <description>Name or prefix name of the Linux client</description>
+ </bind>
+ <bind name="network" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork">
+ <description>Network on which to attach the virtual network interface</description>
+ </bind>
+ <bind name="dnsServerList" type="Array/string" export-name="ipv4dnsServerList">
+ <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
+ </bind>
+ <bind name="dnsDomain" type="string" export-name="dnsDomain">
+ <description>(Optional) DNS domain suffix such as vmware.com</description>
+ </bind>
+ <bind name="dhcp" type="boolean" export-name="dhcp">
+ <description>Use a DHCP server to configure the virtual network adapter</description>
+ </bind>
+ <bind name="gateway" type="Array/string" export-name="ipv4gateway">
+ <description>(Optional) List of gateways, in order of preference</description>
+ </bind>
+ <bind name="ipAddress" type="string" export-name="ipv4Address">
+ <description>Fixed, valid IP address</description>
+ </bind>
+ <bind name="macAddress" type="string" export-name="macAddress">
+ <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>
+ </bind>
+ <bind name="subnetMask" type="string" export-name="ipv4subnetMask">
+ <description>[Optional] Subnet mask for this virtual network adapter</description>
+ </bind>
+ <bind name="diskIndex" type="number" export-name="diskIndex">
+ <description>Disk index</description>
+ </bind>
+ <bind name="diskSize" type="number" export-name="vmDiskSize">
+ <description>Disk size (in GB)</description>
+ </bind>
+ <bind name="diskMode" type="VC:VirtualDiskMode" export-name="diskMode">
+ <description>Disk persistence mode</description>
+ </bind>
+ <bind name="scsiBusNumber" type="number" export-name="scsiBusNumber">
+ <description>SCSI controller bus number</description>
+ </bind>
+ <bind name="thinProvisioned" type="boolean" export-name="thinProvisioned">
+ <description>Use thin provisioning?</description>
+ </bind>
+ <bind name="fullName" type="string" export-name="fullName">
+ <description>User's full name</description>
+ </bind>
+ <bind name="orgName" type="string" export-name="orgName">
+ <description>Organization name</description>
+ </bind>
+ <bind name="windows_roles" type="Array/string" export-name="windows_roles">
+ <description>Windows roles. Other workflow fetches roles from database</description>
+ </bind>
+ <bind name="vlan_name" type="string" export-name="vlan_name">
+ <description>Vlan descriptive name</description>
+ </bind>
+ <bind name="ad_domain_id" type="number" export-name="ad_domain_id"/>
+ <bind name="ad_domain_name" type="string" export-name="ad_domain_name"/>
+ <bind name="vmPassword" type="SecureString" export-name="vmPassword"/>
+ <bind name="osname" type="string" export-name="osname"/>
+ <bind name="ipv6gateway" type="string" export-name="ipv6gateway"/>
+ <bind name="ipv6dnsServerList" type="Array/string" export-name="ipv6dnsServerList"/>
+ <bind name="ipv6address" type="string" export-name="ipv6Address"/>
+ <bind name="ipv6Prefixlen" type="number" export-name="ipv6prefixlen"/>
+ <bind name="memory" type="number" export-name="vmMemorySize"/>
+ <bind name="vcpu" type="number" export-name="vmNbOfCpus"/>
+ </in-binding>
+
+ <out-binding>
+ <bind name="newVM1" type="VC:VirtualMachine" export-name="newVM"/>
+ </out-binding>
+
+ <description>
+Create a clone of the template and configure the clone.
+
+This will also configure any 3'rd party systems, like AD etc.
+ </description>
+
+ <position x="884.5" y="28.136363636363633"/>
+ </workflow-item>
+
+ <workflow-item name="item1" type="end" end-mode="0">
+ <position x="204.5" y="81.77272727272727"/>
+ </workflow-item>
+
+ <workflow-item name="item0" throw-bind-name="errorCode" type="end" end-mode="1">
+ <position x="464.5" y="145.4090909090909"/>
+ </workflow-item>
+
+ <workflow-item name="item2" out-name="item6" catch-name="item10" throw-bind-name="errorCode" type="link" linked-workflow-id="a5c7285f-1b6c-45e6-a4cb-3b2881b54cb0">
+ <display-name>get_project</display-name>
+
+ <in-binding>
+ <bind name="computerName" type="string" export-name="name"/>
+ </in-binding>
+
+ <out-binding>
+ <bind name="project" type="string" export-name="project"/>
+ <bind name="ldapPath" type="string" export-name="ldapPath"/>
+ </out-binding>
+
+ <description>Small flow used to get ldapPath for AD object. Also returns project name.</description>
+
+ <position x="524.5" y="273.59090909090907"/>
+ </workflow-item>
+
+ <workflow-item name="item3" out-name="item2" type="link" linked-workflow-id="e606a877-eb2a-4ff8-ba1c-2e48aba0e869">
+ <display-name>generate_password</display-name>
+
+ <in-binding/>
+
+ <out-binding>
+ <bind name="passwd" type="SecureString" export-name="vmPassword"/>
+ </out-binding>
+
+ <description>Generate a dynamic password for the vm's Administrator account</description>
+
+ <position x="385.0" y="274.09090909090907"/>
+ </workflow-item>
+
+ <presentation>
+ <p-param name="name">
+ <desc>Virtual machine currently being processed</desc>
+ </p-param>
+ <p-param name="cluster">
+ <desc>cluster</desc>
+ </p-param>
+ <p-param name="folder">
+ <desc>Folder to store the new VM</desc>
+ </p-param>
+ <p-param name="template_name">
+ <desc>template_name</desc>
+ </p-param>
+ <p-param name="viktighet">
+ <desc>Resource group to add VM into</desc>
+ </p-param>
+ <p-param name="vlan_id">
+ <desc>vlanid</desc>
+ </p-param>
+ <p-param name="vmDiskSize">
+ <desc>Size of virtual disk in GB</desc>
+ </p-param>
+ <p-param name="vmMemorySize">
+ <desc>Virtual machine's memory size in MB</desc>
+ </p-param>
+ <p-param name="vmNbOfCpus">
+ <desc>Number of virtual processors</desc>
+ </p-param>
+ <p-param name="vlan_name">
+ <desc>Vlan descriptive name</desc>
+ </p-param>
+ <p-param name="osname">
+ <desc>Navn på OS</desc>
+ </p-param>
+ <p-param name="ad_domain_id">
+ <desc>Ad omain id from database. If > 0 add vm in AD</desc>
+ </p-param>
+ <p-param name="ad_domain_name">
+ <desc>Ad domain to join</desc>
+ </p-param>
+ <p-param name="datacenter">
+ <desc>datacenter</desc>
+ </p-param>
+ <p-param name="ipv4gateway">
+ <desc>(Optional) List of gateways, in order of preference</desc>
+ </p-param>
+ <p-param name="ipv4Address">
+ <desc>Fixed valid IP address</desc>
+ </p-param>
+ <p-param name="ipv4subnetMask">
+ <desc>(Optional) Subnet mask for this virtual network adapter</desc>
+ </p-param>
+ <p-param name="macAddress">
+ <desc>Dersom undef, så defineres ikke macAddress</desc>
+ </p-param>
+ <p-param name="windows_roles">
+ <desc>Windows roles. Other workflow fetches roles from database</desc>
+ </p-param>
+ <p-param name="ipv4dnsServerList">
+ <desc>(Optional) List of DNS servers for a virtual network adapter with a static IP address</desc>
+ </p-param>
+ <p-param name="ipv6gateway">
+ <desc>ipv6gateway</desc>
+ </p-param>
+ <p-param name="ipv6prefixlen">
+ <desc>ipv6prefixlen</desc>
+ </p-param>
+ <p-param name="ipv6Address">
+ <desc>ipv6Address</desc>
+ </p-param>
+ <p-param name="ipv6dnsServerList">
+ <desc>ipv6dnsServerList</desc>
+ </p-param>
+ </presentation>
+</workflow>