core: Move WaitForCommunicator to backports and make it generic
This commit is contained in:
parent
f5661280bc
commit
4fbd7c0182
2 changed files with 6 additions and 7 deletions
|
@ -1,8 +1,7 @@
|
||||||
# This acts like a backport of Vagrant's built in action from 1.3+ for older versions
|
# This acts like a backport of Vagrant's built in action from 1.3+ for previous version
|
||||||
# and will probably be deprecated on 0.8+
|
|
||||||
# https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/action/builtin/wait_for_communicator.rb
|
# https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/action/builtin/wait_for_communicator.rb
|
||||||
module Vagrant
|
module Vagrant
|
||||||
module LXC
|
module Backports
|
||||||
module Action
|
module Action
|
||||||
class WaitForCommunicator
|
class WaitForCommunicator
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
|
@ -21,7 +20,7 @@ module Vagrant
|
||||||
max_tries = @env[:machine].config.ssh.max_tries.to_i
|
max_tries = @env[:machine].config.ssh.max_tries.to_i
|
||||||
max_tries.times do |i|
|
max_tries.times do |i|
|
||||||
if @env[:machine].communicate.ready?
|
if @env[:machine].communicate.ready?
|
||||||
@env[:ui].info I18n.t("vagrant_lxc.messages.container_ready")
|
@env[:ui].info 'Machine booted and ready!'
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -39,3 +38,5 @@ module Vagrant
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Vagrant::Action::Builtin.const_set :WaitForCommunicator, Vagrant::Backports::Action::WaitForCommunicator
|
|
@ -15,8 +15,6 @@ en:
|
||||||
# TODO: Remove the following keys after we drop support for vagrant < 1.3
|
# TODO: Remove the following keys after we drop support for vagrant < 1.3
|
||||||
waiting_for_start: |-
|
waiting_for_start: |-
|
||||||
Waiting for container to start. This should not take long.
|
Waiting for container to start. This should not take long.
|
||||||
container_ready: |-
|
|
||||||
Container started and ready for use!
|
|
||||||
warn_networks: |-
|
warn_networks: |-
|
||||||
Warning! The LXC provider doesn't support any of the Vagrant public / private
|
Warning! The LXC provider doesn't support any of the Vagrant public / private
|
||||||
network configurations (ex: `config.vm.network :private_network, ip: "some-ip"`).
|
network configurations (ex: `config.vm.network :private_network, ip: "some-ip"`).
|
||||||
|
|
Loading…
Reference in a new issue