fixup a few bugs w/ copying files
git-svn-id: file:///home/svn/framework3/trunk@12712 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
c1233db428
commit
c979f3a43d
|
@ -106,8 +106,7 @@ class RemoteWorkstationDriver < VmDriver
|
|||
# delete it on the guest
|
||||
vmrunstr = "ssh #{@user}@#{@host} \"vmrun -T ws -gu #{@vm_user} -gp #{@vm_pass} " +
|
||||
"deleteFileInGuest \'#{@location}\' \'#{remote_tempfile_path}\'\""
|
||||
system_command(vmrunstr)
|
||||
|
||||
#system_command(vmrunstr)
|
||||
|
||||
# and delete it on the vm host
|
||||
vmhost_delete_command = "ssh #{@user}@#{@host} rm #{local_tempfile_path}"
|
||||
|
@ -132,8 +131,8 @@ class RemoteWorkstationDriver < VmDriver
|
|||
from = filter_input(from)
|
||||
to = filter_input(to)
|
||||
if @tools
|
||||
vmrunstr = "\"ssh #{@user}@#{@host} vmrun -T ws -gu #{@vm_user} -gp #{@vm_pass} " +
|
||||
"copyFileFromGuestToHost \'#{@location}\' \'{from}\' \'{to}\' nogui\""
|
||||
vmrunstr = "ssh #{@user}@#{@host} \"vmrun -T ws -gu #{@vm_user} -gp #{@vm_pass} " +
|
||||
"copyFileFromGuestToHost \'#{@location}\' \'#{from}\' \'#{to}\' nogui\""
|
||||
system_command(vmrunstr)
|
||||
else
|
||||
scp_to(from,to)
|
||||
|
@ -146,8 +145,8 @@ class RemoteWorkstationDriver < VmDriver
|
|||
to = filter_input(to)
|
||||
|
||||
if @tools
|
||||
vmrunstr = "\"ssh #{@user}@#{@host} vmrun -T ws -gu #{@vm_user} -gp #{@vmpass} " +
|
||||
"copyFileFromHostToGuest \'#{@location}\' \'{from}\' \'{to}\' nogui\""
|
||||
vmrunstr = "ssh #{@user}@#{@host} \"vmrun -T ws -gu #{@vm_user} -gp #{@vm_pass} " +
|
||||
"copyFileFromHostToGuest \'#{@location}\' \'#{from}\' \'#{to}\' nogui\""
|
||||
system_command(vmrunstr)
|
||||
else
|
||||
scp_to(from,to)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
##
|
||||
## $Id$
|
||||
##
|
||||
## This is the main lab controller. Require this file to create a lab of vms
|
||||
## This is the main lab controller.
|
||||
##
|
||||
##
|
||||
|
||||
|
@ -25,15 +25,14 @@ module Controllers
|
|||
class VmController
|
||||
|
||||
include Enumerable
|
||||
include Lab::Controllers::WorkstationController ## gives access to workstation-specific controller methods
|
||||
include Lab::Controllers::WorkstationVixrController ## gives access to workstation-specific controller methods
|
||||
include Lab::Controllers::RemoteWorkstationController ## gives access to workstation-specific controller methods
|
||||
include Lab::Controllers::VirtualBoxController ## gives access to virtualbox-specific controller methods
|
||||
include Lab::Controllers::DynagenController ## gives access to dynagen-specific controller methods
|
||||
|
||||
#include Lab::Controllers::QemuController ## gives access to qemu-specific controller methods
|
||||
#include Lab::Controllers::QemudoController ## gives access to qemudo-specific controller methods
|
||||
#include Lab::Controllers::AmazonController ## gives access to amazon-specific controller methods
|
||||
include Lab::Controllers::WorkstationController
|
||||
include Lab::Controllers::WorkstationVixrController
|
||||
include Lab::Controllers::RemoteWorkstationController
|
||||
include Lab::Controllers::VirtualBoxController
|
||||
include Lab::Controllers::DynagenController
|
||||
#include Lab::Controllers::QemuController
|
||||
#include Lab::Controllers::QemudoController
|
||||
#include Lab::Controllers::AmazonController
|
||||
|
||||
|
||||
def initialize (labdef=nil)
|
||||
|
|
|
@ -117,7 +117,7 @@ private
|
|||
def filter_input(string)
|
||||
return unless string
|
||||
|
||||
if !(string =~ /^[\w\s\[\]\{\}\/\\\.\-\"\(\)]*$/)
|
||||
if !(string =~ /^[\w\s\[\]\{\}\/\\\.\-\"\(\):]*$/)
|
||||
raise "WARNING! Invalid character in: #{string}"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue