From de42681742791cb99b859dc496dad15235cfb976 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 6 Nov 2018 10:05:15 -0800 Subject: [PATCH 1/2] Inherit from common base since 5.1 driver has no changes --- plugins/providers/virtualbox/driver/version_5_2.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/providers/virtualbox/driver/version_5_2.rb b/plugins/providers/virtualbox/driver/version_5_2.rb index cd6c0b6c5..b67e793c1 100644 --- a/plugins/providers/virtualbox/driver/version_5_2.rb +++ b/plugins/providers/virtualbox/driver/version_5_2.rb @@ -1,10 +1,10 @@ -require File.expand_path("../version_5_1", __FILE__) +require File.expand_path("../version_5_0", __FILE__) module VagrantPlugins module ProviderVirtualBox module Driver # Driver for VirtualBox 5.2.x - class Version_5_2 < Version_5_1 + class Version_5_2 < Version_5_0 def initialize(uuid) super From 9d728682c47d885a79bff731b143ab286ca4b14e Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 6 Nov 2018 10:06:09 -0800 Subject: [PATCH 2/2] Add vbox provider driver for 6.0 --- plugins/providers/virtualbox/driver/meta.rb | 1 + .../providers/virtualbox/driver/version_6_0.rb | 16 ++++++++++++++++ plugins/providers/virtualbox/plugin.rb | 1 + 3 files changed, 18 insertions(+) create mode 100644 plugins/providers/virtualbox/driver/version_6_0.rb diff --git a/plugins/providers/virtualbox/driver/meta.rb b/plugins/providers/virtualbox/driver/meta.rb index ec457a866..24547b404 100644 --- a/plugins/providers/virtualbox/driver/meta.rb +++ b/plugins/providers/virtualbox/driver/meta.rb @@ -63,6 +63,7 @@ module VagrantPlugins "5.0" => Version_5_0, "5.1" => Version_5_1, "5.2" => Version_5_2, + "6.0" => Version_6_0, } if @@version.start_with?("4.2.14") diff --git a/plugins/providers/virtualbox/driver/version_6_0.rb b/plugins/providers/virtualbox/driver/version_6_0.rb new file mode 100644 index 000000000..859268722 --- /dev/null +++ b/plugins/providers/virtualbox/driver/version_6_0.rb @@ -0,0 +1,16 @@ +require File.expand_path("../version_5_0", __FILE__) + +module VagrantPlugins + module ProviderVirtualBox + module Driver + # Driver for VirtualBox 6.0.x + class Version_6_0 < Version_5_0 + def initialize(uuid) + super + + @logger = Log4r::Logger.new("vagrant::provider::virtualbox_6_0") + end + end + end + end +end diff --git a/plugins/providers/virtualbox/plugin.rb b/plugins/providers/virtualbox/plugin.rb index 090bc5061..e058ec65a 100644 --- a/plugins/providers/virtualbox/plugin.rb +++ b/plugins/providers/virtualbox/plugin.rb @@ -58,6 +58,7 @@ module VagrantPlugins autoload :Version_5_0, File.expand_path("../driver/version_5_0", __FILE__) autoload :Version_5_1, File.expand_path("../driver/version_5_1", __FILE__) autoload :Version_5_2, File.expand_path("../driver/version_5_2", __FILE__) + autoload :Version_6_0, File.expand_path("../driver/version_6_0", __FILE__) end module Model