første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / Library / vCenter / Virtual Machine management / Power Management / Shut down guest OS and wait.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="item0" object-name="Workflow:name=generic" id="BD80808080808080808080808080808075C280800122528313869552e41805bb1" version="0.2.0" api-version="3.1.0" allowed-operations="fv" restartMode="1" resumeFromFailedMode="0">
3     <display-name>Shut down guest OS and wait</display-name>
4
5     <description>Shuts down a guest operating system and waits for the process to complete.</description>
6
7     <position x="280.0" y="0.0"/>
8
9     <input>
10         <param name="vm" type="VC:VirtualMachine">
11             <description>Virtual machine to shut down</description>
12         </param>
13     </input>
14
15     <attrib name="task" type="VC:Task" read-only="false">
16         <value encoded="n">__NULL__</value>
17         <description>Task to await</description>
18     </attrib>
19     <attrib name="progress" type="boolean" read-only="false">
20         <value encoded="n">false</value>
21         <description>Log progress while waiting for the task</description>
22     </attrib>
23     <attrib name="pollRate" type="number" read-only="false">
24         <value encoded="n">1.0</value>
25         <description>Polling rate for the task state, in seconds</description>
26     </attrib>
27     <attrib name="timeout" type="number" read-only="false">
28         <value encoded="n">10.0</value>
29         <description>Timeout before forcing the shutdown, in minutes</description>
30     </attrib>
31
32     <workflow-item name="item0" out-name="item2" type="custom-condition" alt-out-name="item1">
33         <display-name>Suspended?</display-name>
34
35         <script encoded="false">
36 return vm.runtime.powerState.value == "suspended";
37         </script>
38
39         <in-binding>
40             <bind name="vm" type="VC:VirtualMachine" export-name="vm"/>
41         </in-binding>
42
43         <position x="240.0" y="50.0"/>
44     </workflow-item>
45
46     <workflow-item name="item2" out-name="item3" type="task" script-module="com.vmware.library.vc.vm.power/startVM">
47         <display-name>startVM</display-name>
48
49         <script encoded="false">
50 //Auto generated script, cannot be modified !
51 actionResult = System.getModule("com.vmware.library.vc.vm.power").startVM(vm,host) ;
52         </script>
53
54         <in-binding>
55             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
56                 <description>VM to start or resume</description>
57             </bind>
58             <bind name="host" type="VC:HostSystem" explicitly-not-bound="true" export-name="NULL">
59                 <description>[Optional] The host where the virtual machine is to be powered on. If no host is specified, the current associated host is used. This field must specify a host that is part of the same compute resource that the virtual machine is currently associated with. If this host is not compatible, the current host association is used.</description>
60             </bind>
61         </in-binding>
62
63         <out-binding>
64             <bind name="actionResult" type="VC:Task" export-name="task"/>
65         </out-binding>
66
67         <description>Start / Resume a VM. Return the start task</description>
68
69         <position x="400.0" y="60.0"/>
70     </workflow-item>
71
72     <workflow-item name="item3" out-name="item1" type="task" script-module="com.vmware.library.vc.basic/vim3WaitTaskEnd">
73         <display-name>vim3WaitTaskEnd</display-name>
74
75         <script encoded="false">
76 //Auto generated script, cannot be modified !
77 actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
78         </script>
79
80         <in-binding>
81             <bind name="task" type="VC:Task" export-name="task">
82                 <description>Task to Wait for</description>
83             </bind>
84             <bind name="progress" type="boolean" export-name="progress">
85                 <description>Log progess while waiting for the task</description>
86             </bind>
87             <bind name="pollRate" type="number" export-name="pollRate">
88                 <description>Polling rate for the task state [seconds]</description>
89             </bind>
90         </in-binding>
91
92         <out-binding>
93             <bind name="actionResult" type="Any" explicitly-not-bound="true" export-name="NULL"/>
94         </out-binding>
95
96         <description>
97 Wait a VIM 3 Task to end.
98 When task ended, return the
99         </description>
100
101         <position x="400.0" y="140.0"/>
102     </workflow-item>
103
104     <workflow-item name="item1" out-name="item4" type="task" script-module="com.vmware.library.vc.vm.power/shutdownVM">
105         <display-name>shutdownVM</display-name>
106
107         <script encoded="false">
108 //Auto generated script, cannot be modified !
109 System.getModule("com.vmware.library.vc.vm.power").shutdownVM(vm,timeout,polling) ;
110         </script>
111
112         <in-binding>
113             <bind name="vm" type="VC:VirtualMachine" export-name="vm"/>
114             <bind name="timeout" type="number" export-name="timeout">
115                 <description>Timeout in minutes [min]</description>
116             </bind>
117             <bind name="polling" type="number" export-name="pollRate">
118                 <description>Polling rate in seconds [s]</description>
119             </bind>
120         </in-binding>
121
122         <out-binding/>
123
124         <description>Shutdown the VM guest and wait for a given time before throwing an error if the VM is still not powered off. If timeout is set to 0, the action don't wait</description>
125
126         <position x="240.0" y="140.0"/>
127     </workflow-item>
128
129     <workflow-item name="item4" type="end" end-mode="0">
130         <position x="280.0" y="170.0"/>
131     </workflow-item>
132
133     <presentation>
134         <p-qual name="autostart">true</p-qual>
135         <p-group>
136             <title>Virtual Machine</title>
137             <desc>Virtual Machine to shutdown.</desc>
138             <p-param name="vm">
139                 <desc>Virtual machine to shut down</desc>
140             </p-param>
141         </p-group>
142     </presentation>
143 </workflow>