diff --git a/lib/vagrant/plugin/remote.rb b/lib/vagrant/plugin/remote.rb index d485e4d04..c97844acc 100644 --- a/lib/vagrant/plugin/remote.rb +++ b/lib/vagrant/plugin/remote.rb @@ -4,6 +4,7 @@ module Vagrant module Plugin module Remote autoload :Communicator, "vagrant/plugin/remote/communicator" + autoload :Guest, "vagrant/plugin/remote/guest" autoload :Manager, "vagrant/plugin/remote/manager" autoload :Plugin, "vagrant/plugin/remote/plugin" autoload :Provider, "vagrant/plugin/remote/provider" diff --git a/lib/vagrant/plugin/remote/guest.rb b/lib/vagrant/plugin/remote/guest.rb new file mode 100644 index 000000000..c94da0baf --- /dev/null +++ b/lib/vagrant/plugin/remote/guest.rb @@ -0,0 +1,30 @@ +module Vagrant + module Plugin + module Remote + class Guest + # This module enables Guest for server mode + module Remote + + # Add an attribute accesor for the client + # when applied to the Guest class + def self.prepended(klass) + klass.class_eval do + attr_accessor :client + end + end + + def initialize(machine) + @logger = Log4r::Logger.new("vagrant::remote::guest") + @logger.debug("initializing guest with remote backend") + @machine = machine + @client = machine.client.guest + end + + def detect?(machine) + @client.detect(machine) + end + end + end + end + end +end