Add guest remote plugin module
This commit is contained in:
parent
8911ebd2b7
commit
56edbfa3b8
@ -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"
|
||||
|
||||
30
lib/vagrant/plugin/remote/guest.rb
Normal file
30
lib/vagrant/plugin/remote/guest.rb
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user