første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / Library / vCenter / Guest operations / Files / Create directory in guest.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="item1" object-name="workflow:name=generic" id="C88080808080808080808080808080809880808001322751030482b80adf61e7c" version="0.0.0" api-version="3.1.0" allowed-operations="fv" restartMode="1" resumeFromFailedMode="0">
3     <display-name>Create directory in guest</display-name>
4
5     <description>Create a directory in a guest virtual machine.</description>
6
7     <position x="100.0" y="50.0"/>
8
9     <input>
10         <param name="vmUsername" type="string">
11             <description>Username for the virtual machine</description>
12         </param>
13         <param name="vmPassword" type="SecureString">
14             <description>Password for the virtual machine</description>
15         </param>
16         <param name="vm" type="VC:VirtualMachine">
17             <description>Virtual machine</description>
18         </param>
19         <param name="dirPath" type="string">
20             <description>Guest path</description>
21         </param>
22         <param name="createParents" type="boolean">
23             <description>Create parent directories if missing</description>
24         </param>
25     </input>
26
27     <output>
28         <param name="result" type="boolean">
29             <description>Set to true if directory was created successfully</description>
30         </param>
31     </output>
32
33     <workflow-item name="item0" type="end" end-mode="0">
34         <position x="385.0" y="45.90909090909091"/>
35     </workflow-item>
36
37     <workflow-item name="item1" out-name="item0" type="task">
38         <display-name>Scriptable task</display-name>
39
40         <script encoded="false">
41 var host = vm.sdkConnection;
42
43 var guestOperationsManager = host.guestOperationsManager;
44 var guestAuth = new VcNamePasswordAuthentication();
45 guestAuth.username = vmUsername;
46 guestAuth.password = vmPassword;
47
48 var fileManager = guestOperationsManager.fileManager;
49 result = false;
50 fileManager.makeDirectoryInGuest(vm , guestAuth , dirPath, createParents);
51 result = true;
52         </script>
53
54         <in-binding>
55             <bind name="vmUsername" type="string" export-name="vmUsername"/>
56             <bind name="vmPassword" type="SecureString" export-name="vmPassword"/>
57             <bind name="vm" type="VC:VirtualMachine" export-name="vm"/>
58             <bind name="dirPath" type="string" export-name="dirPath"/>
59             <bind name="createParents" type="boolean" export-name="createParents"/>
60         </in-binding>
61
62         <out-binding>
63             <bind name="result" type="boolean" export-name="result"/>
64         </out-binding>
65
66         <position x="205.0" y="55.90909090909091"/>
67     </workflow-item>
68
69     <presentation>
70         <p-param name="vmUsername">
71             <desc>Username for the virtual machine</desc>
72         </p-param>
73         <p-param name="vmPassword">
74             <desc>Password for the virtual machine</desc>
75         </p-param>
76         <p-param name="vm">
77             <desc>Virtual machine</desc>
78             <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
79         </p-param>
80         <p-param name="dirPath">
81             <desc>Guest path</desc>
82             <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
83         </p-param>
84         <p-param name="createParents">
85             <desc>Create parent directories if missing</desc>
86         </p-param>
87     </presentation>
88 </workflow>