From 61cf179b42299b4d5e8b19c192a7705159d1bf50 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 1 Feb 2019 13:33:01 -0800 Subject: [PATCH] Add base address attribute to vm config --- plugins/kernel_v2/config/vm.rb | 3 +++ test/unit/plugins/kernel_v2/config/vm_test.rb | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index 83e525f3d..fc8b5d5b2 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -20,6 +20,7 @@ module VagrantPlugins attr_accessor :allowed_synced_folder_types attr_accessor :base_mac + attr_accessor :base_address attr_accessor :boot_timeout attr_accessor :box attr_accessor :ignore_box_vagrantfile @@ -50,6 +51,7 @@ module VagrantPlugins @allowed_synced_folder_types = UNSET_VALUE @base_mac = UNSET_VALUE + @base_address = UNSET_VALUE @boot_timeout = UNSET_VALUE @box = UNSET_VALUE @ignore_box_vagrantfile = UNSET_VALUE @@ -377,6 +379,7 @@ module VagrantPlugins # Defaults @allowed_synced_folder_types = nil if @allowed_synced_folder_types == UNSET_VALUE @base_mac = nil if @base_mac == UNSET_VALUE + @base_address = nil if @base_address == UNSET_VALUE @boot_timeout = 300 if @boot_timeout == UNSET_VALUE @box = nil if @box == UNSET_VALUE @ignore_box_vagrantfile = false if @ignore_box_vagrantfile == UNSET_VALUE diff --git a/test/unit/plugins/kernel_v2/config/vm_test.rb b/test/unit/plugins/kernel_v2/config/vm_test.rb index 59c28767c..00576cbb3 100644 --- a/test/unit/plugins/kernel_v2/config/vm_test.rb +++ b/test/unit/plugins/kernel_v2/config/vm_test.rb @@ -52,6 +52,13 @@ describe VagrantPlugins::Kernel_V2::VMConfig do end end + describe "#base_address" do + it "defaults properly" do + subject.finalize! + expect(subject.base_address).to be_nil + end + end + describe "#box" do it "is required" do subject.box = nil