Skip to content

Instantly share code, notes, and snippets.

@happymcplaksin
Created January 30, 2014 17:17
Show Gist options
  • Save happymcplaksin/8713751 to your computer and use it in GitHub Desktop.
Save happymcplaksin/8713751 to your computer and use it in GitHub Desktop.
require 'pp'
facts2get = %w(orgName numberOfVApps memoryUsedMB memoryLimitMB memoryAllocationMB cpuUsedMhz cpuLimitMhz cpuAllocationMhz storageUsedMB storageLimitMB storageAllocationMB cpuOverheadMhz memoryOverheadMB storageOverheadMB)
vcloud.get_execute_query("adminOrgVdc").body[:AdminVdcRecord].each do |vdc|
facts = Hash.new
facts2get.each do |fact|
facts[fact] = vdc[fact.to_sym]
end
orgs[facts['orgName']] = facts
end
pp orgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment