From f243bb5886d5f18059d0c68711fa0fdac8f1883a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Font=C3=A1n=20Mui=C3=B1os?= Date: Fri, 13 Mar 2009 21:32:35 +0000 Subject: [PATCH] Cleaning non used code git-svn-id: http://svn.opennebula.org/one/trunk@410 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/im_mad/im_ssh/one_im_ssh.rb | 35 --------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/im_mad/im_ssh/one_im_ssh.rb b/src/im_mad/im_ssh/one_im_ssh.rb index fb29cf4c76..77c55241f2 100755 --- a/src/im_mad/im_ssh/one_im_ssh.rb +++ b/src/im_mad/im_ssh/one_im_ssh.rb @@ -87,42 +87,7 @@ class Sensor end end - def execute_old(host, log_proc) - if send_script(host, log_proc) - cmd=SSHCommand.run(@script, host, log_proc) - if cmd.code==0 - # Splits the output by lines, strips each line and gets only - # lines that have something - value=cmd.stdout.split("\n").collect {|v| - v2=v.strip - if v2=="" - nil - else - v2 - end - }.compact.join(",") - else - value="Could not execute remote script in " + - host + ": "+remote_script - log_proc.call(value) - nil - end - else - nil - end - end - private - - def send_script(host, log_proc) - cmd=LocalCommand.run("scp #{script} #{host}:#{@remote_dir}") - if cmd.code==0 - true - else - log_proc.call("Can not send script to remote machine: "+host) - false - end - end # Generates an unique identifier using name of the sensor and its script def gen_identifier