box_download_insecure to not validate https of box_url [GH-1712]

This commit is contained in:
Mitchell Hashimoto 2013-07-20 00:18:02 -04:00
parent 4151df884a
commit af66f5f930
3 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,8 @@
FEATURES:
- `vagrant help <command>` now works. [GH-1578]
- Added `config.vm.box_download_insecure` to allor the box_url setting
to point to an https site that won't be validated. [GH-1712]
IMPROVEMENTS:

View File

@ -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_insecure = env[:machine].config.vm.box_download_insecure
lock.synchronize do
# First see if we actually have the box now.
@ -60,6 +61,7 @@ module Vagrant
begin
env[:action_runner].run(Vagrant::Action.action_box_add, {
:box_download_insecure => box_download_insecure,
:box_name => box_name,
:box_provider => box_formats,
:box_url => box_url

View File

@ -16,6 +16,7 @@ module VagrantPlugins
attr_accessor :base_mac
attr_accessor :box
attr_accessor :box_url
attr_accessor :box_download_insecure
attr_accessor :graceful_halt_retry_count
attr_accessor :graceful_halt_retry_interval
attr_accessor :guest
@ -24,6 +25,7 @@ module VagrantPlugins
attr_reader :provisioners
def initialize
@box_download_insecure = UNSET_VALUE
@graceful_halt_retry_count = UNSET_VALUE
@graceful_halt_retry_interval = UNSET_VALUE
@guest = UNSET_VALUE
@ -230,6 +232,7 @@ module VagrantPlugins
def finalize!
# Defaults
@box_download_insecure = false if @box_download_insecure == UNSET_VALUE
@guest = nil if @guest == UNSET_VALUE
@hostname = nil if @hostname == UNSET_VALUE