I have created a solution for this in TypeScript using the Aria Build Tools
https://github.com/vmware/build-tools-for-vmware-aria
public VcStoragePodLogDetails(objVcStoragePod: VcStoragePod): void {
let objVcStoragePodSummary: VcStoragePodSummary = objVcStoragePod.summary;
let arrVcDatastore: VcDatastore[] = objVcStoragePod.childEntity as VcDatastore[];
this.objLogger.info(`VcStoragePod Name = ${objVcStoragePod.name} has ${arrVcDatastore.length} datastores with a total capacity of ${objVcStoragePodSummary.capacity.toString()} and a free space of ${objVcStoragePodSummary.freeSpace}.`);
arrVcDatastore.forEach((objVcDatastore: VcDatastore): void => {
let objVcDatastoreCapability: VcDatastoreCapability = objVcDatastore.capability;
let arrVcDatastoreHostMount: VcDatastoreHostMount[] = objVcDatastore.host;
let objVcDatastoreSummary: VcDatastoreSummary = objVcDatastore.summary;
let objVcVmfsDatastoreInfo: VcVmfsDatastoreInfo = objVcDatastore.info as VcVmfsDatastoreInfo;
let objVcHostVmfsVolume: VcHostVmfsVolume = objVcVmfsDatastoreInfo.vmfs;
this.objLogger.info(`VcStoragePod Name = ${objVcStoragePod.name} has a datastore named ${objVcDatastore.name} with a type of ${objVcVmfsDatastoreInfo.vmfs.type} with a total provisioned space of ${objVcDatastore.provisionedSpace.toString()} with a total capacity of ${objVcDatastore.capacity.toString()} and a free space of ${objVcDatastore.freeSpace.toString()} which is mounted by ${arrVcDatastoreHostMount.length} ESXi hosts.`);
});
}
------------------------------
Simon Sparks
Automation & Orchestration Consultant
North West England, UK, Europe
Broadcom Employee
------------------------------