Hi,
Check the following sample code:
System.log("Mounted datastores for host: " + host.name);
var datastores = host.datastore;
for each (var ds in datastores) {
var hostsOfDs = ds.host;
for each (var h in hostsOfDs) {
if (h.key != host) continue;
if (!h.mountInfo.mounted) continue;
System.log(" > datastore: '" + ds.name + (ds.summary.accessible?"'":"' (inaccessible)"));
}
}
Hi,
Check the following sample code:
System.log("Mounted datastores for host: " + host.name);
var datastores = host.datastore;
for each (var ds in datastores) {
var hostsOfDs = ds.host;
for each (var h in hostsOfDs) {
if (h.key != host) continue;
if (!h.mountInfo.mounted) continue;
System.log(" > datastore: '" + ds.name + (ds.summary.accessible?"'":"' (inaccessible)"));
}
}