mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Load remote communincator
This commit is contained in:
parent
10b4015455
commit
2e693b60fe
2 changed files with 7 additions and 11 deletions
|
|
@ -194,16 +194,11 @@ module Vagrant
|
|||
end
|
||||
|
||||
def communicate
|
||||
# TODO: this should be communicating with the client.communicate
|
||||
if !@communicator
|
||||
requested = @config.vm.communicator
|
||||
requested ||= :ssh
|
||||
klass = Vagrant.plugin("2").manager.communicators[requested]
|
||||
raise Errors::CommunicatorNotFound, comm: requested.to_s if !klass
|
||||
@communicator = klass.new(self)
|
||||
@logger.debug("Getting communicator from client")
|
||||
if !@communicate
|
||||
@communicate = Vagrant::Plugin::V2::Communicator.new(self)
|
||||
end
|
||||
|
||||
@communicator
|
||||
@communicate
|
||||
end
|
||||
|
||||
def guest
|
||||
|
|
|
|||
|
|
@ -22,9 +22,10 @@ module VagrantPlugins
|
|||
SDK::Ref::Target.new(resource_id: resource_id)
|
||||
end
|
||||
|
||||
# @return [Communicator]
|
||||
# TODO: Implement
|
||||
# @return [Client::Communicator]
|
||||
def communicate
|
||||
comm_raw = client.communicate(Empty.new)
|
||||
Communicator.load(comm_raw, broker: @broker)
|
||||
end
|
||||
|
||||
# @return [Pathname] target specific data directory
|
||||
|
|
|
|||
Loading…
Reference in a new issue