Merge branch 'client-certs' of https://github.com/sthulb/vagrant into sthulb-client-certs
Conflicts: config/default.rb lib/vagrant/action/builtin/handle_box_url.rb plugins/commands/box/command/add.rb
This commit is contained in:
commit
13b52f6b6e
|
@ -32,6 +32,7 @@ module Vagrant
|
|||
downloader_options[:continue] = true
|
||||
downloader_options[:insecure] = env[:box_download_insecure]
|
||||
downloader_options[:ui] = env[:ui]
|
||||
downloader_options[:client_cert] = env[:box_client_cert]
|
||||
|
||||
# If the temporary path exists, verify it is not too old. If its
|
||||
# too old, delete it first because the data may have changed.
|
||||
|
|
|
@ -38,6 +38,7 @@ module Vagrant
|
|||
# raise a terrible runtime error.
|
||||
box_name = env[:machine].config.vm.box
|
||||
box_url = env[:machine].config.vm.box_url
|
||||
box_download_client_cert = env[:machine].config.vm.box_download_client_cert
|
||||
box_download_insecure = env[:machine].config.vm.box_download_insecure
|
||||
|
||||
lock.synchronize do
|
||||
|
@ -61,10 +62,11 @@ module Vagrant
|
|||
|
||||
begin
|
||||
env[:action_runner].run(Vagrant::Action.action_box_add, {
|
||||
:box_client_cert => box_download_client_cert,
|
||||
:box_download_insecure => box_download_insecure,
|
||||
:box_name => box_name,
|
||||
:box_provider => box_formats,
|
||||
:box_url => box_url
|
||||
:box_url => box_url,
|
||||
})
|
||||
rescue Errors::BoxAlreadyExists
|
||||
# Just ignore this, since it means the next part will succeed!
|
||||
|
|
|
@ -23,6 +23,7 @@ module Vagrant
|
|||
@continue = options[:continue]
|
||||
@insecure = options[:insecure]
|
||||
@ui = options[:ui]
|
||||
@client_cert = options[:client_cert]
|
||||
end
|
||||
|
||||
# This executes the actual download, downloading the source file
|
||||
|
@ -43,6 +44,7 @@ module Vagrant
|
|||
|
||||
options += ["--continue-at", "-"] if @continue
|
||||
options << "--insecure" if @insecure
|
||||
options << "--cert" << @client_cert if @client_cert
|
||||
options << @source
|
||||
|
||||
# Specify some options for the subprocess
|
||||
|
|
|
@ -23,6 +23,11 @@ module VagrantPlugins
|
|||
options[:insecure] = i
|
||||
end
|
||||
|
||||
o.on("--cert certfile", String,
|
||||
"The client SSL cert") do |c|
|
||||
options[:client_cert] = c
|
||||
end
|
||||
|
||||
o.on("--provider provider", String,
|
||||
"The provider that backs the box.") do |p|
|
||||
options[:provider] = p
|
||||
|
@ -44,7 +49,8 @@ module VagrantPlugins
|
|||
:box_url => argv[1],
|
||||
:box_clean => options[:clean],
|
||||
:box_force => options[:force],
|
||||
:box_download_insecure => options[:insecure]
|
||||
:box_download_client_cert => options[:client_cert],
|
||||
:box_download_insecure => options[:insecure],
|
||||
})
|
||||
|
||||
# Success, exit status 0
|
||||
|
|
|
@ -17,6 +17,7 @@ module VagrantPlugins
|
|||
attr_accessor :base_mac
|
||||
attr_accessor :boot_timeout
|
||||
attr_accessor :box
|
||||
attr_accessor :client_cert
|
||||
attr_accessor :box_url
|
||||
attr_accessor :box_download_insecure
|
||||
attr_accessor :graceful_halt_timeout
|
||||
|
|
Loading…
Reference in New Issue