In the first part of exploration into the Ruby vSphere Console I have stumbled across so many new and interesting ways to interact with VSAN.
For a brief introduction to the RVC I suggest you start back here http://www.punchingclouds.com/2013/08/30/vsphere-5-5-vsphere-ruby-console/.
I came across this little nugget I was not aware of the ‘table’ command which I couldn’t find much documentation for. Although fairly straight forward, the use of the command is really quite powerful.
/localhost/DCName> table -h
usage: table [opts] obj…
Display a table with the selected fields
You may specify the fields to display using multiple -f options, or
separate them with ‘:’. The available fields for an object are
shown by the “fields” command.
obj: Path to a RVC::InventoryObject
–field, -f <s>: Field to display
–sort, -s <s>: Field to sort by
–reverse, -r: Reverse sort order
–help, -h: Show this message
/localhost/VSAN-DC> table -f name -f state.connection:num.vms:num.poweredonvms:cpuusage:memusage:uptime:build ~/computers/*/hosts/*
See, pretty cool hey!
I’ll have lots more stuff coming soon.