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

bug #1423: now local vmm actions can use remote network script

ssh_stream is always created but is lazily opened on the first
command execution
This commit is contained in:
Javi Fontan 2012-09-20 12:50:56 +02:00
parent 3576b06df0
commit a428b319de
2 changed files with 3 additions and 11 deletions

View File

@ -161,8 +161,6 @@ class SshStreamCommand < RemotesCommand
@remote_dir = remote_dir
@stream = SshStream.new(host, shell)
@stream.open
end
def run(command, stdin=nil, base_cmd = nil)

View File

@ -257,15 +257,9 @@ class ExecDriver < VirtualMachineDriver
# @param[String] id of the VM to log messages
# @return [SshStreamCommand]
def get_ssh_stream(aname, host, id)
stream = nil
if not action_is_local?(aname)
stream = SshStreamCommand.new(host,
@remote_scripts_base_path,
log_method(id), nil, @shell)
else
return nil
end
SshStreamCommand.new(host,
@remote_scripts_base_path,
log_method(id), nil, @shell)
end
#---------------------------------------------------------------------------