første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.network / getNetworksForVimHost.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getNetworksForVimHost" result-type="Array/VC:Network" api-version="3.1.0" id="ccf4a83a-1893-4c73-b22f-5cae1b26346e" version="0.3.0" allowed-operations="fv">
3     <description>Return all existing networks in a VimHost</description>
4
5     <param n="vimHost" t="VC:SdkConnection"/>
6
7     <script encoded="false">
8 var result = new Properties();
9 var hosts = vimHost.getAllHostSystems();
10 for (var i in hosts) {
11         var networks = hosts[i].network;
12         for (var j in networks) {
13                 result.put(networks[j].sdkId , networks[j]);
14         }
15 }
16 var arr = new Array();
17 var keys = result.keys;
18 for (var i in keys) {
19         arr.push(result.get(keys[i]));
20 }
21 return arr;
22     </script>
23 </dunes-script-module>