server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
# There is just one hardware profile where memory is measured using maximum
# memory available on ESX for virtual machines and CPU using maximum free
# CPU cores in ESX.
There is just one hardware profile where memory is measured using maximum
memory available on ESX for virtual machines and CPU using maximum free
CPU cores in ESX.
There is just one hardware profile where memory is measured using maximum memory available on ESX for virtual machines and CPU using maximum free CPU cores in ESX .
def hardware_profiles(credentials, opts={})
      vsphere = new_client(credentials)
      safely do
        service = vsphere.serviceInstance.content
        max_memory, max_cpu_cores = [], []
         Note: Memory is being hardcoded now to range 512MB to 2GB
               JIRA: DTACLOUD-123
        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.min)
          memory (512..2048)
          architecture ['x86_64', 'i386']
        end]
      end
    end
def hardware_profiles ( credentials , opts = { } ) vsphere = new_client ( credentials ) safely do service = vsphere . serviceInstance . content max_memory , max_cpu_cores = [ ] , [ ] service . rootFolder . childEntity . grep ( RbVmomi :: VIM :: Datacenter ) . each do | dc | max_cpu_cores << dc . hostFolder . childEntity . first . summary . numCpuCores end [ Deltacloud :: HardwareProfile :: new ( 'default' ) do cpu ( 1 .. max_cpu_cores . min ) memory ( 512 .. 2048 ) architecture [ 'x86_64' , 'i386' ] end ] end end
There is just one hardware profile where memory is measured using maximum
memory available on ESX for virtual machines and CPU using maximum free
CPU cores in ESX.
There is just one hardware profile where memory is measured using maximum memory available on ESX for virtual machines and CPU using maximum free CPU cores in ESX .
# # Note: Memory is being hardcoded now to range 512MB to 2GB #       JIRA: DTACLOUD-123 # # max_memory << dc.hostFolder.childEntity.first.summary.effectiveMemory
credentials
<not_specific>
opts
<not_specific>