]> git.uio.no Git - virt-orchestrator.git/blobdiff - vFLOWER/content/Actions/com.vmware.library.vc.resourcePool/getAllChildResourcePool.action.xml
første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.resourcePool / getAllChildResourcePool.action.xml
diff --git a/vFLOWER/content/Actions/com.vmware.library.vc.resourcePool/getAllChildResourcePool.action.xml b/vFLOWER/content/Actions/com.vmware.library.vc.resourcePool/getAllChildResourcePool.action.xml
new file mode 100644 (file)
index 0000000..e34f64b
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <description>Return all resource pool of the given resource pool</description>
+
+    <param n="resourcePool" t="VC:ResourcePool"/>
+
+    <script encoded="false">
+var result = new Array();
+
+getRPfromRP(resourcePool);
+return result;
+
+
+function getRPfromRP(rp) {
+       result = result.concat(rp.resourcePool);
+       for (var i in rp.resourcePool) {
+               getRPfromRP(rp.resourcePool[i]);
+       }
+}
+    </script>
+</dunes-script-module>