1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

Merge branch 'master' of git.opennebula.org:one

This commit is contained in:
Carlos Martín 2012-01-20 17:46:47 +01:00
commit 5c3b03ba44

View File

@ -50,9 +50,8 @@ GANGLIA_PORT=8649
domain=ARGV[0]
dom_id=ARGV[1]
host=ARGV[2]
dom_id=ARGV[2]
host=ARGV[1]
# Gets monitoring data from ganglia or file
begin
@ -69,6 +68,12 @@ end
doms_info=ganglia.get_vms_information
dom_id=domain.split('-').last
# Unknown state when the VM is not found
if !doms_info || !(doms_info[domain] || doms_info[dom_id])
puts "STATE=d"
exit(0)
end
# Get key one-<vmid> or <vmid> key from the hash
dom_info=doms_info[domain]
dom_info=doms_info[dom_id] if !dom_info