feature #3718: Updated dummy driver to new monitor names

This commit is contained in:
Ruben S. Montero committed 2015-06-29 13:07:28 +02:00
1 parent e00ef94e55
commit b3cc5229d7
2 files changed
+3 -3

No files matched your search

-1
View File
@@ -56,7 +56,6 @@ class VirtualMachineDriver < OpenNebulaDriver
:nettx => "NETTX",
:netrx => "NETRX",
:state => "STATE",
:total_disk_size => "TOTAL_DISK_SIZE",
:disk_size => "DISK_SIZE",
:snapshot_size => "SNAPSHOT_SIZE"
}
+3 -2
View File
@@ -196,8 +196,9 @@ class DummyDriver < VirtualMachineDriver
"#{POLL_ATTRIBUTE[:netrx]}=#{prev_netrx+(100*rand(4))} " \
"#{POLL_ATTRIBUTE[:memory]}=#{max_memory * (rand(80)+20)/100} " \
"#{POLL_ATTRIBUTE[:cpu]}=#{max_cpu * (rand(95)+5)/100} " \
"#{POLL_ATTRIBUTE[:total_disk_size]}=#{rand(1024)} " \
"#{POLL_ATTRIBUTE[:disk_size]}=#{rand(1024)}"
"#{POLL_ATTRIBUTE[:disk_size]}=[ID=0, SIZE=#{rand(1024)}] "\
"#{POLL_ATTRIBUTE[:disk_size]}=[ID=1, SIZE=#{rand(1024)}] "\
"#{POLL_ATTRIBUTE[:snapshot_size]}=[ID=1, DISK_ID=0, SIZE=#{rand(1024)}] "
send_message(ACTION[:poll],result,id,monitor_info)
end