How to associate esx cluster with Datastore report
Hi all,
i am running a repore that shows data stores less that 50 gig free. The storage team would like a coloum for the esx clusters associated with the luns. I can't see to find this and is it possible.
I would create a WCF Function, script type, with a parameter of timeRange, and a new context parameter of datastore of type VMWDatastore, required, not a list. Set the output to a common:string.
add the following script:
qs = server.QueryService
query = "!VMWCluster where esxServers.datastores.uniqueId = '${datastore.uniqueId}'"
john_s_main
132 Posts
346
0
Posted January 30th, 2013 14:00
I would create a WCF Function, script type, with a parameter of timeRange, and a new context parameter of datastore of type VMWDatastore, required, not a list. Set the output to a common:string.
add the following script:
qs = server.QueryService
query = "!VMWCluster where esxServers.datastores.uniqueId = '${datastore.uniqueId}'"
clusters = server.QueryService.queryTopologyObjects(query)
clusterNames = clusters?.collect{cluster-> cluster?.name}?.join(', ')
return clusterNames
you can then use this in your report, feeding it the context entry for the current line's datastore.