class VagrantNoneCommunicator::Communicator
This class provides no communication with the VM
Public Class Methods
match?(machine)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 6 def self.match?(machine) # All machines are capable of not communicating true end
new(machine)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 11 def initialize(machine) @machine = machine @logger = Log4r::Logger.new("vagrant::plugin::communication::none") end
Public Instance Methods
download(from, to=nil)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 38 def download(from, to=nil) @logger.debug("trying to download! Not acutally going to do it") true end
execute(command, opts=nil, &block)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 27 def execute(command, opts=nil, &block) @logger.debug("trying to run command #{command}") @logger.debug("not actually going to do it!") # Good exit status return 0 end
generate_environment_export(env_key, env_value)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 58 def generate_environment_export(env_key, env_value) template = machine_config_ssh.export_command_template template.sub("%ENV_KEY%", env_key).sub("%ENV_VALUE%", env_value) + "\n" end
ready?()
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 21 def ready? @logger.debug("ready! not actually going to connect") # Always ready true end
reset!()
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 53 def reset! @logger.debug("trying to reset! Not acutally going to do it") true end
sudo(command, opts=nil, &block)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 34 def sudo(command, opts=nil, &block) execute(command, opts, &block) end
test(command, opts=nil)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 43 def test(command, opts=nil) @logger.debug("trying to test! Not acutally going to do it") execute(command, opts) == 0 end
upload(from, to)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 48 def upload(from, to) @logger.debug("trying to upload! Not acutally going to do it") true end
wait_for_ready(timeout)
click to toggle source
# File lib/vagrant-none-communicator/communicator.rb, line 16 def wait_for_ready(timeout) @logger.debug("always ready, never connecting") true end