første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.basic / getDatacenterForVimObject.action.xml
CommitLineData
d8fdd35b
SA
1<?xml version="1.0" encoding="UTF-8"?>
2<dunes-script-module name="getDatacenterForVimObject" result-type="VC:Datacenter" api-version="3.1.0" id="6e4e9ced-de28-4565-aed9-e9839d1422fe" version="0.2.0" allowed-operations="fv">
3 <description>
4Return the Datacenter for any Vim object.
5Return null if not in a datacenter (Datacenter folder)
6 </description>
7
8 <param n="object" t="Any"/>
9
10 <script encoded="false">
11var parent = object;
12
13while (parent != null &amp;&amp; ! (parent instanceof VcDatacenter)) {
14 parent = parent.parent;
15}
16return parent;
17 </script>
18</dunes-script-module>