def hardware_profiles(credentials, opts={})
vsphere = new_client(credentials)
safely do
service = vsphere.serviceInstance.content
max_memory, max_cpu_cores = 0, 0
service.rootFolder.childEntity.grep(RbVmomi::VIM::Datacenter).each do |dc|
max_memory += dc.hostFolder.childEntity.first.summary.effectiveMemory
max_cpu_cores += dc.hostFolder.childEntity.first.summary.numCpuCores
end
[Deltacloud::HardwareProfile::new('default') do
cpu (1..max_cpu_cores)
memory (128..max_memory)
architecture ['x86_64', 'i386']
end]
end
end