Open abuenop opened 11 years ago
I have two hosts in my infraestructure, but the script only discovered one. I have changed a few lines. The diff output is
164,165c164,165 < @dc.hostFolder.childEntity[0].host.grep(RbVmomi::VIM::HostSystem).each do |stat| < newname = stat.name.gsub(/:/,"-") --- > @dc.hostFolder.children.each do |stat| > newname = stat.host.first.name.gsub(/:/,"-") 169,180c169,180 < "host-Hostname" => stat.name, < "host-Product" => stat.summary.config.product.fullName, < "host-HardwareMode" => stat.summary.hardware.model, < "host-CPUModel" => stat.summary.hardware.cpuModel, < "host-CPUMHz" => stat.summary.hardware.cpuMhz, < "host-CPUCore" => stat.summary.hardware.numCpuCores, < "host-CPUUsage" => stat.summary.quickStats.overallCpuUsage, < "host-TotalMemorySize" => stat.summary.hardware.memorySize/1024/1024, < "host-MemoryUsage" => stat.summary.quickStats.overallMemoryUsage, < "host-PowerState" => stat.summary.runtime.powerState, < "host-MaintenanceMode" => stat.summary.runtime.inMaintenanceMode, < "host-Uptime" => stat.summary.quickStats.uptime --- > "host-Hostname" => stat.host.first.name, > "host-Product" => stat.host.first.summary.config.product.fullName, > "host-HardwareMode" => stat.host.first.summary.hardware.model, > "host-CPUModel" => stat.host.first.summary.hardware.cpuModel, > "host-CPUMHz" => stat.host.first.summary.hardware.cpuMhz, > "host-CPUCore" => stat.host.first.summary.hardware.numCpuCores, > "host-CPUUsage" => stat.host.first.summary.quickStats.overallCpuUsage, > "host-TotalMemorySize" => stat.host.first.summary.hardware.memorySize/1024/1024, > "host-MemoryUsage" => stat.host.first.summary.quickStats.overallMemoryUsage, > "host-PowerState" => stat.host.first.summary.runtime.powerState, > "host-MaintenanceMode" => stat.host.first.summary.runtime.inMaintenanceMode, > "host-Uptime" => stat.host.first.summary.quickStats.uptime
I have two hosts in my infraestructure, but the script only discovered one. I have changed a few lines. The diff output is