første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.resourcePool / getAllChildResourcePool.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getAllChildResourcePool" result-type="Array/VC:ResourcePool" api-version="3.1.0" id="a9e966ff-d1f6-42a0-8949-785216c01922" version="0.2.0" allowed-operations="fv">
3     <description>Return all resource pool of the given resource pool</description>
4
5     <param n="resourcePool" t="VC:ResourcePool"/>
6
7     <script encoded="false">
8 var result = new Array();
9
10 getRPfromRP(resourcePool);
11 return result;
12
13
14 function getRPfromRP(rp) {
15         result = result.concat(rp.resourcePool);
16         for (var i in rp.resourcePool) {
17                 getRPfromRP(rp.resourcePool[i]);
18         }
19 }
20     </script>
21 </dunes-script-module>