1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

feature #595: scripts always get id and host as parameters

This commit is contained in:
Javi Fontan 2011-05-30 16:53:48 +02:00
parent f330549cc2
commit c2ec359873
4 changed files with 11 additions and 5 deletions

View File

@ -61,7 +61,7 @@ class InformationManagerDriverSSH < OpenNebulaDriver
LocalCommand.run(sync_cmd, log_method(number))
end
end
do_action("#{@hypervisor} #{host}", number, host, :monitor,
do_action("#{@hypervisor}", number, host, :monitor,
:script_name => 'run_probes')
end
end

View File

@ -33,7 +33,9 @@ GANGLIA_PORT=8649
#GANGLIA_FILE='data.xml'
host=ARGV[1]
hypervisor=ARGV[0]
host_id=ARGV[1]
host=ARGV[2]
# Gets monitoring data from ganglia or file
begin

View File

@ -111,7 +111,9 @@ class OpenNebulaDriver < ActionManager
:script_name => nil
}.merge(ops)
command=action_command_line(aname, parameters, options[:script_name])
params=parameters+" #{id} #{host}"
command=action_command_line(aname, params, options[:script_name])
if action_is_local? aname
local_action(command, id, aname)

View File

@ -49,8 +49,10 @@ GANGLIA_PORT=8649
#GANGLIA_FILE='data.xml'
host=ARGV[0]
domain=ARGV[1]
domain=ARGV[0]
dom_id=ARGV[1]
host=ARGV[2]
# Gets monitoring data from ganglia or file
begin